Auto Scaling Group

In this part, we will create an auto scaling group that will manage the number of instances that we have running. If the app is being used a lot, then the auto scaling group will add more instances, and if getting used less, it will remove instances for us.

We will also connect this to the load balancer to that we balance the network traffic to any instances that are available in the auto scaling group.

Launch Template

Creating a launch template is very similar to setting up an EC2 instance. Similar options that is: security group, instance type, IAM role, etc. But the launch template is just a template, it doesn't actually create any instances.

Once we have a template, we can use that to create ec2 instances without having to go through all the options every single time.

step 1:

In the EC2 console, click on Launch Templates, then Create launch template

Click Launch Templates in the EC2 console
step 2:

Give it a name and select the Auto Scaling guidance checkbox

Enter a name and select the **Auto Scaling guidance** checkbox
step 3:

In the AMI section, select My AMIs, then select the newest qr app AMI that you setup in the last section

Select My AMIs and choose your custom AMI
step 4:

For Instance type, select t2.micro

Select t3.micro as the instance type
step 5:

In Network settings, don't include the subnet, but make sure to add the app security group

Skip network settings and configure security group
step 6:

Expand Advanced Details and select the IAM role for the app instance

Expand Advanced Details and locate User data
Cloud Course
Cloud Course
$89.70
$299.00 Lifetime
  • 81+ learning resources
  • 57 lessons and tutorials
  • 15 hands-on deployments
  • 9 quizzes
  • 29 videos (4h 17m 38s)
  • More content coming soon
  • Unlimited lifetime access to all course content
  • Deployment assessment CLI tool
  • Exclusive Discord access
Original Price:$299.00
Discount:-$209.30
Total:$89.70