This post will be hands on for the below tasks:
...........................................................................................................................................................................
create an auto scaling group for our application
collecting the auto scaling group to our load balancer
...........................................................................................................................................................................
Before Launching Auto scaling Group have to configure Launch configuration.
Launch configuration: Collection of attribute values to be used for launching EC2 instances.
from the EC2 instance launch page --> right side navigation --> Auto scaling section --> Launch configuration.
- Click on Create Auto Scaling group.
- Read the description for step1 and step2 and click create launch configuration.
Step 1:
Select the instance type.
Choose the instance type, as my account is free account. I’m
using free tier eligible instance type.
Click on Next
In the configure details
Provide general details
Name: <best_describe_for the instance>
In the Advance details section: user data section can add bootstrap
script.
Click on Next.
Provide storage information.
In Size (GiB): provide the size of root volume.
By clicking on the Add New Volume can add new EBS volumes.
Fill security group information.
Click on Review.
Finally in the Review section, review all the inputs
provided so far.
Click on Create launch configuration.
In case of any corrections click on previous and
adjust the previous inputs.
Make sure that TCP port is open for application
load balancer sg & classic- load balancer.
Finally click on create launch configuration.
As usually download key pair.
Step2:
Launch configuration - comes from step 1.
provides Group name, Group size, here i am okay with default VPN ,subnet - to scale across availability zones and high availability of application.
1.definitely need to enable load balancer.
Click on Next.