Working with Amazon EC2 Auto Scaling Groups and Network Load Balancer

The hands-on lab is part of this learning path

SysOps Administrator – Associate Certification Preparation for AWS
course-steps 35 certification 5 lab-steps 30 quiz-steps 4 description 5

Lab Steps

Logging in to the Amazon Web Services Console
Auto Scaling Overview
Creating a Network Load Balancer
Creating a Launch Configuration
Creating an Auto Scaling Group from a Launch Configuration
Testing the Auto Scaling Group from End-to-End
Validate Working with Amazon EC2 Auto Scaling Groups and Network Load Balancer

Ready for the real environment experience?

Max Duration1h 15m
star star star star star-half


This Lab introduces the basics of Auto Scaling in Amazon Web Services. The Amazon Web Services (AWS) Auto Scaling service automatically adds or removes compute resources allocated for your cloud application, in response to changes in demand. For applications configured to run on a cloud infrastructure, scaling is an important part of cost control and resource management.

Scaling is the ability to increase or decrease the compute capacity of your application either by changing the number of servers (horizontal scaling) or by changing the size of the servers (vertical scaling).

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.

In this Lab, you will create an Auto Scaling Group and place it behind a Network Load Balancing (NLB). Don't worry if you don't fully understand all the components yet. Each one will be discussed in greater detail as you create and configure them. At the end of this Lab you will have an Auto Scaling Group with several web server instances behind a Network Load Balancer. 

Lab Objectives

Upon completion of this Lab you will be able to:

  • Configure Auto Scaling to automatically launch EC2 instances using conditions described by CloudWatch alarms
  • Create and configure a Network Load Balancer
  • Utilize Auto Scaling and a Network Load Balancer to ensure the availability of compute resources
  • Build an elastic cluster by integrating Auto Scaling with an Elastic Load Balancer
  • Perform end-to-end testing of the system and understand how to diagnose issues

Lab Prerequisites

Although this is a beginner level Lab, you should be familiar with AWS basics including:

  • Using the AWS Management Console
  • EC2 (launching an instance, connecting to an instance via SSH)
  • Conceptual understanding of CloudWatch, and EC2 Security Groups (firewall rules)


June 24th, 2019 - Updated the instructions to mention the new UDP support for NLBs

April 26th, 2019 - Updated the commands used to install the stress binary

March 14th, 2019 - Modified the Lab to use launch configuration rather than launch template to avoid misconfiguration issues

March 5th, 2019 - Updated the Lab to use a Network Load Balancer and launch template and improved instruction clarity. A Lab using a Classic Elastic Load Balancer, Launch Configurations, and Simple Notification Service is available here.

March 3rd, 2019 - Added a customized validation Lab Step

March 1st, 2019 - Updated environment diagrams to the latest AWS icon library

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

September 10, 2018 - Updated instructions and images to improve the Lab experience

Environment before
Environment after

About the Author

Learning paths7

Logan has been involved in software development and research since 2007 and has been in the cloud since 2012. He is an AWS Certified DevOps Engineer - Professional, AWS Certified Solutions Architect - Professional, Microsoft Certified Azure Solutions Architect Expert, MCSE: Cloud Platform and Infrastructure, Google Cloud Certified Associate Cloud Engineer, Certified Kubernetes Administrator (CKA), Certified Kubernetes Application Developer (CKAD), Linux Foundation Certified System Administrator (LFCS), and Certified OpenStack Administrator (COA). He earned his Ph.D. studying design automation and enjoys all things tech.