Configure an Application Load Balancer and Auto Scaling Group

1.5 hours
  • 5 Learning Objectives

About this Hands-on Lab

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.

Learning Objectives

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

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 /index.

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.

Additional Resources

Bootstrap script:

yum update -y
yum install -y httpd
systemctl start httpd
systemctl enable httpd
usermod -a -G apache ec2-user
chown -R ec2-user:apache /var/www
chmod 2775 /var/www
cd /var/www/html
echo "Welcome to your public facing webpage!" > index.html

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?