aws-elbv2
Manage Application and Network Load Balancers
TLDR
List all Application and Network Load Balancers
SYNOPSIS
aws elbv2 subcommand [options]
DESCRIPTION
aws elbv2 is a subcommand of the AWS CLI that manages Application Load Balancers (ALB) and Network Load Balancers (NLB), the second generation of Elastic Load Balancing services.
Application Load Balancers operate at Layer 7 and support advanced routing based on URL path, hostname, HTTP headers, and query strings. They integrate with WAF, support WebSocket, and can route to Lambda functions.
Network Load Balancers operate at Layer 4 with ultra-low latency and can handle millions of requests per second. They preserve client IP addresses and support static IPs and PrivateLink.
Both types use target groups to route requests to registered targets like EC2 instances, containers, IP addresses, or Lambda functions.
PARAMETERS
describe-load-balancers
List load balancers and their details.create-load-balancer
Create a new ALB or NLB.delete-load-balancer
Remove a load balancer.describe-target-groups
List target groups.create-target-group
Create a new target group.delete-target-group
Remove a target group.describe-target-health
Check health of targets in a group.register-targets
Add targets to a group.deregister-targets
Remove targets from a group.describe-listeners
List listeners on a load balancer.create-listener
Add a listener to a load balancer.describe-rules
List routing rules for a listener.--load-balancer-arn arn
ARN of the load balancer.--target-group-arn arn
ARN of the target group.--type type
Load balancer type: application, network, or gateway.--targets targets
Target specifications (Id, Port, AvailabilityZone).--subnets ids
Subnets for the load balancer.
CAVEATS
Target groups are bound to a specific load balancer type and cannot be shared between ALB and NLB. Deleting a load balancer does not delete associated target groups. ALB requires at least two subnets in different Availability Zones. Cross-zone load balancing behavior differs between ALB (always enabled) and NLB (configurable).
HISTORY
Application Load Balancer launched in August 2016 as AWS's Layer 7 load balancer with content-based routing. Network Load Balancer followed in September 2017 for high-performance Layer 4 workloads. Gateway Load Balancer was added in November 2020 for third-party virtual appliances. Features like weighted target groups, Lambda targets, and gRPC support have been added over time.
