Illustrate the use of network load balancers (NLBs) and launch templates with EC2 Auto Scaling Groups
Deploy the CloudFormation infrastructure/cloudformation.yaml
template. The template creates a user with the following credentials and minimal required permisisons to complete the Lab:
- Username: student
- Password: password
- In the EC2 Console, create an internet-facing Network Load Balancer
- Create a Security Group to allow the required access to your instances behind the load balancer including SSH
- Create a launch template for your Auto Scaling group instances
- Create an Auto Scaling group based on the launch template
- Configure the instances to be added to the load balancer's target group
- Configure a simple scaling policy based on CPU utilization
- Connect to an instance and run the stress binary to cause CPU utilization to spike
- Observe the Auto Scaling group automatically adds more instances and that the instances are added to the target group
To remove all the resources used in the Lab Delete the Auto Scaling group, launch template, security group, and Network Load Balancer. Then delete the CloudFormation stack.