Application Load Balancers (ALB) are a critical component in modern scalable infrastructures. In this lab, we will walk through the process to create security groups, launch configurations, Auto Scaling groups, an Application Load Balancer, and a target tracking scaling policy.
Successfully complete this lab by achieving the following learning objectives:
- Create a Security Group for the ALB Named LabALB Permitting HTTP from Anywhere
Create a security group for the Application Load Balancer permitting HTTP port 80 traffic from 0.0.0.0/0.
- Configure a Security Group for EC2 Instances Named LabEC2
Create a security group for the Application Load Balancer permitting HTTP port 80 traffic from the LabALB security group.
- Configure a Launch Configuration Named ALBLaunchConfig
Configure a launch configuration named "ALBLaunchConfig" using the publicly available Amazon Linux 2 AMI.
Use the LabEC2 security group in this launch configuration.
Select t3.micro for instance type.
Under advanced details, paste the bootstrap script listed in Additional Resources.
- Create an Internet-Facing ALB Named LabALB
During the ALB configuration, leave the default listener rules. Attach 2 Availability Zones. Configure the ALB to use the LabALB security group you created earlier.
In the creation process, create a target group named LabTargetGroup. Configure the health check path to
- Configure an Auto Scaling Group Named LabASG
Configure an Auto Scaling group named LabASG. Use the launch configuration you created earlier. Configure your Auto Scaling group to use your existing VPC, subnet, and ALB. Configure a target tracking scaling policy to trigger when the average CPU utilization averages to 75%. Minimum hosts should be 2, maximum should be 4.