Linux command
aws-elb 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
List all Classic Load Balancers
aws elb describe-load-balancers
Describe a specific load balancer
aws elb describe-load-balancers --load-balancer-names [lb_name]
Check the health
aws elb describe-instance-health --load-balancer-name [lb_name]
Register an instance
aws elb register-instances-with-load-balancer --load-balancer-name [lb_name] --instances [i-xxxxxxxx]
Deregister an instance
aws elb deregister-instances-from-load-balancer --load-balancer-name [lb_name] --instances [i-xxxxxxxx]
Create a Classic Load Balancer
aws elb create-load-balancer --load-balancer-name [lb_name] --listeners Protocol=HTTP,LoadBalancerPort=80,InstanceProtocol=HTTP,InstancePort=80 --subnets [subnet-id] --security-groups [sg-id]
Delete a load balancer
aws elb delete-load-balancer --load-balancer-name [lb_name]
说明
aws elb is a subcommand of the AWS CLI that manages Classic Load Balancers (CLB), the original Elastic Load Balancing service. Classic Load Balancers distribute incoming traffic across multiple EC2 instances in one or more Availability Zones. CLB operates at both Layer 4 (TCP) and Layer 7 (HTTP/HTTPS), routing traffic based on application or network level information. It performs health checks on registered instances and only routes traffic to healthy targets. Classic Load Balancers support sticky sessions, SSL termination, and integration with Auto Scaling groups for dynamic instance management.
参数
- describe-load-balancers
- List load balancers and their configuration.
- create-load-balancer
- Create a new Classic Load Balancer.
- delete-load-balancer
- Remove a load balancer.
- describe-instance-health
- Check health status of registered instances.
- register-instances-with-load-balancer
- Add instances to a load balancer.
- deregister-instances-from-load-balancer
- Remove instances from a load balancer.
- configure-health-check
- Set health check parameters.
- create-load-balancer-listeners
- Add listener configurations.
- delete-load-balancer-listeners
- Remove listeners.
- set-load-balancer-listener-ssl-certificate
- Update the SSL certificate for an HTTPS listener.
- describe-load-balancer-attributes
- Retrieve attributes such as connection draining and access log settings.
- modify-load-balancer-attributes
- Modify attributes such as connection draining and idle timeout.
- describe-load-balancer-policies
- List policies associated with load balancers.
- create-load-balancer-policy
- Create a new policy for a load balancer.
- delete-load-balancer-policy
- Remove a policy from a load balancer.
- create-app-cookie-stickiness-policy
- Enable application-controlled session stickiness.
- create-lb-cookie-stickiness-policy
- Enable load balancer-controlled session stickiness.
- attach-load-balancer-to-subnets
- Add subnets to a load balancer (VPC only).
- detach-load-balancer-from-subnets
- Remove subnets from a load balancer.
- enable-availability-zones-for-load-balancer
- Add Availability Zones to a load balancer (EC2-Classic).
- disable-availability-zones-for-load-balancer
- Remove Availability Zones from a load balancer.
- apply-security-groups-to-load-balancer
- Associate security groups with a VPC load balancer.
- add-tags
- Add or overwrite tags on a load balancer.
- remove-tags
- Remove tags from a load balancer.
FAQ
What is the aws-elb command used for?
aws elb is a subcommand of the AWS CLI that manages Classic Load Balancers (CLB), the original Elastic Load Balancing service. Classic Load Balancers distribute incoming traffic across multiple EC2 instances in one or more Availability Zones. CLB operates at both Layer 4 (TCP) and Layer 7 (HTTP/HTTPS), routing traffic based on application or network level information. It performs health checks on registered instances and only routes traffic to healthy targets. Classic Load Balancers support sticky sessions, SSL termination, and integration with Auto Scaling groups for dynamic instance management.
How do I run a basic aws-elb example?
Run `aws elb describe-load-balancers` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does describe-load-balancers do in aws-elb?
List load balancers and their configuration.