hands-on lab

Launching Auto Scaling Groups behind a Classic Load Balancer

Difficulty: Intermediate
Duration: Up to 1 hour and 45 minutes
Students: 4,562
Rating: 4.8/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

Auto Scaling helps you maintain application availability and allows you to scale your Amazon EC2 capacity up or down automatically according to the defined conditions. You can use Auto Scaling to help ensure that you are running your desired number of Amazon EC2 instances. Auto Scaling can also automatically increase the number of Amazon EC2 instances during demand spikes to maintain performance and decrease capacity during lulls to reduce costs. Auto Scaling is well suited to applications that have stable demand patterns, or that experience hourly, daily, or weekly variability in usage.

Elastic Load Balancing (ELB) allows the distribution of incoming traffic to your Amazon AWS infrastructure across multiple instances. This represents a great tool in avoiding failures in your applications and web traffic. ELB automatically detects failures in your EC2 instances and redirects traffic to other available instances. 

In this lab, you will create a Classic Load Balancer to load balance the traffic to the instances that will be launched in the Auto Scaling group that we will also create. To make sure that our application scales, you will configure a Scaling Policy to scale the infrastructure up and down based on the usage.

Please note: AWS will be retiring the EC2-Classic network and Classic Load Balancers in August 2022. You can still complete this lab to learn about them. However, you won't be expected to know about Classic Load Balancers to pass any certifications. After August 2022 use of Classic Load Balancers will no longer be recommended by AWS.

Learning Objectives

By the end of this Lab, you should be able to:

  • Associate Auto Scaling groups with Classic Load Balancers
  • Understand how ELB's health checks affect ASGs
  • Configure Scaling Policies

Prerequisites

This is an intermediate level Lab, in order to follow the next steps you should be able to:

  • Describe and launch EC2 instances
  • Understand and use user data scripts
  • Describe, create, and configure Security Groups
  • Describe and launch Classic Load Balancers
  • Describe and launch an Auto Scaling group
  • Basic Understanding of the CloudWatch service

If you don't have this knowledge, please refer to these Labs first:

Updates

October 26th, 2023 - Updated the instructions and screenshots to reflect the latest UI

October 12th, 2021 - Updated screenshots to reflect the latest user-interface changes 

June 9th, 2021 - Addressed an issue with the CPU utilization application and updated screenshots for the auto-scaling interface

August 31st, 2020 - Updated screenshots for the new EC2 user interface

August 10th, 2020 - Updated all instructions and screenshots

June 27th, 2019 - Added a custom validation lab step to check the work performed in the lab

January 10th, 2019 - Added a validation Lab Step to check the work you perform in the Lab

Environment before

Environment after

Covered topics

Lab steps

Logging In to the Amazon Web Services Console
Creating a Classic Load Balancer
Creating a Launch Template
Creating an Auto Scaling Group Associated with a Classic Load Balancer
Creating a Scaling Policy
Making the Application Scale