Create Application Load Balancer

Create Application Load Balancer

In this section, we will create an ALB to forward the incoming traffic to the private ECS cluster.

First, we have to set Outbound rule in the security group of the ALB to allow the traffic from the ALB to the ECS cluster.

Container

  1. Search Load Balancers in the AWS Management Console and click on the Create Load Balancer button. Container Container
  • Choose Application Load Balancer Container

  • Name: docker-container-alb Container

  • In Network mapping, select the VPC and the subnets.

    • VPC: my-workshop-01
    • Availability Zones: us-east-1a and us-east-1b
    • Subnet: public-subnet-01 and public-subnet-02 Container
  • Security group: alb-sg-01 Container

  • In Listeners and routing section, we create a target group by choosing Create target group Container

  • This will lead you to the Create target group page. Configure the target group as shown below and click on the Create button.

    • Target type: Instances
    • Target group name: alb-tg-01 Container
    • VPC: my-workshop-01
    • Protocol version: HTTP1 Container
    • Healthy threshold: 2
    • Unhealthy threshold: 5
    • Interval: 10
    • Choose Next Container Container
    • Choose Create target group Container Container
  1. Back to the Create Load Balancer page:
  • Click on Reload button and choose the target group that we have just created. Container
  • Finally, click on the Create load balancer button. Container Container