Tuesday, 25 August 2020

Auto Scaling Group - Hands on

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:

 Now the screen will go directly to Create Auto Scaling Group


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.



click on Advance details drop down,

1.definitely need to enable load balancer.
2. Choose among classic load balancer or Target groups.
3.Health Check type - based on individual  requirement.
4.Health check Grace period - based on individual requirement.
5.Finally click on Next.


Configure scaling policies: for now i am going with keep the group at its initial size. However  we can define policies to scaling groups.

Click on Next.

Configure Notification: if you want to configure any email notification regarding the scaling EC2 instances. you can configure here. By clicking on Add notification button.

Now click on Next. As i don't want any notifications now
  


Tags are just for  better description of EC2 instances. provide tags info is needed. Click on Next.



Review and click on create Auto scaling group: