AWS CLI Commands for Elastic Load Balancing (ELB)

AWS CLI Commands for Elastic Load Balancing (ELB)

Autopublished from RSS Original article

AWS Elastic Load Balancing (ELB) distributes incoming application or network traffic across multiple targets, such as Amazon EC2 instances, containers, and IP addresses, in multiple Availability Zones. ELB scales your load balancer as traffic to your application changes over time, and can automatically scale to the vast majority of workloads.

Here are some of the AWS CLI commands for managing ELBs:

  1. Classic Load Balancer

  2. aws elb create-load-balancer --load-balancer-name [my-load-balancer] --listeners Protocol=HTTP,LoadBalancerPort=80,InstanceProtocol=HTTP,InstancePort=80 --availability-zones [us-west-2a] – Create a Classic Load Balancer.

  3. aws elb describe-load-balancers – Describe your Classic Load Balancers.
  4. aws elb delete-load-balancer --load-balancer-name [my-load-balancer] – Delete a Classic Load Balancer.

  5. Application Load Balancer

  6. aws elbv2 create-load-balancer --name [my-load-balancer] --subnets [subnet-0c55b51b] – Create an Application Load Balancer.

  7. aws elbv2 describe-load-balancers – Describe your Application Load Balancers.
  8. aws elbv2 delete-load-balancer --load-balancer-arn [arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188] – Delete an Application Load Balancer.

  9. Network Load Balancer

  10. aws elbv2 create-load-balancer --name [my-load-balancer] --type network --subnets [subnet-0c55b51b] – Create a Network Load Balancer.

  11. aws elbv2 describe-load-balancers – Describe your Network Load Balancers.
  12. aws elbv2 delete-load-balancer --load-balancer-arn [arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/net/my-load-balancer/6ac8a4d9cdcd8dcc] – Delete a Network Load Balancer.

Please replace the placeholder text in brackets ([...]) with your actual values. These commands may require additional parameters depending on your specific use case. Always refer to the official AWS CLI documentation for more information about using the AWS CLI with Elastic Load Balancing.

It’s important to note that each type of load balancer ensures availability through redundancy, while scaling and securing your traffic.

Did you find this article valuable?

Support Abhay Singh by becoming a sponsor. Any amount is appreciated!