Open In App

Create and Configure the Auto Scaling Group in EC2

Last Updated : 17 Nov, 2023
Comments
Improve
Suggest changes
Like Article
Like
Report

Auto Scaling is an Amazon Web Service it allows instances to scale when traffic or CPU load increases. Auto-scaling is a service that monitors all instances that are configured into the Auto Scaling group and ensures that loads are balanced in all instances. Depending on the load scaling group, increase the instance according to the configuration. When we created the auto-scaling group, we configured the Desired capacity, Minimum capacity, maximum capacity, and CPU utilization. If CPU utilization increases by 60% in all instances, one more instance is created, and if CPU utilization decreases by 30% in all instances, one instance is terminated. These are totally up to us; what is our requirement. If any Instance fails due to any reason, then the Scaling group maintains the Desired capacity and starts another instance.

The auto-scaling group follows Horizontal Scaling. This service is very important for us nowadays because we do not need to create new instances manually and do not require manual monitoring.

AWS Auto Scaling

AWS auto scaling is used to scale up and scale down the EC2-instance by depending up on the incoming traffic. You can scale up and scale down the applications in few minutes based up on the traffic which will decrease the latency of the application to the end-users. You can integrate the AWS Auto Scaling with multiple services provided by the AWS like Amazon traffic,, Amazon DynamoDB, and Amazon Aurora. You can also decrease the cost of an application because of dynamic scaling. When there is traffic , only maximum resources are used other wise it will use minimum resources.

Auto-Scaling---ec2

Benefits of Auto Scaling

  1. Dynamical scaling: AWS auto-scaling service doesn't required any type of manual intervention it will automatically scale the application down and up by depending up on the incoming traffic.
  2. Pay For You Use: Because of auto scaling the resource will be utilised in the optimised way where the demand is low the resource utilisation will be low and the demand will high the resource utilisation will increase so the AWS is going to charge you only for the amount of resources you really used.
  3. Automatic Performance Maintenance: AWS autoscaling maintains the optimal application performance with considering the workloads it will ensures that the application is running to desired level which will decrease the latency and also the capacity will be increased by based on your application

How AWS Auto Scaling Works?

AWS autoscaling will scale the application based on the load of application. Instead of scaling manually AWS auto scaling will scale the application automatically when the incoming traffic is high it will scale up the application and when the traffic is low it will scale down the application.

AWS-AUTOSCALING

First you should choose which service or an application you want to scale then select the optimisation way like cost and performance and then keep track how the scaling is working.

Steps To create Auto Scaling Launch Template

Step 1: Click on the All Services.

Step 2: Click on the EC2(Elastic Cloud Computing).

ec2
 

Step 3: Scroll Down and click on the Launch Templates and click on the Create launch template

Create Launch Template
 

Step 4: Type the Template name.

Configuration Of lauch Template
 

Step 5: Select the Amazon Machine Image.

select AMI
 

Step 6: Select the Instance Type and Key pair.

select instance type
 

Step 7: Select the Security Group or Create the new one.

security group
 

Step 8: Click on the Create Launch Template.

launch instance
 

Step 9: Now you can see the template is created. Now, scroll down and click on the Auto Scaling Groups.

autoscaling
 

Create An Auto Scaling Group Using a Launch Template

Step 1: Click on the Create Auto Scaling group.

create autoscaling group
 

Step 2: Type the Auto Scaling group name.

 Auto Scaling group name
 

Step 3: Select your Template.

create template

Step 4: Select the VPC or go with the default VPC and also select the Availability zone.

select VPC

Step 5: Configure the Group size and Scaling policies.

Select as per your requirement:

  • Desired: 4
  • Minimum: 4
  • Maximum: 8
configure size

Step 6: Select the Target tracking scaling policy.

scaling policies

Step 7: Click on the Create Auto Scaling Group.

 Create Auto Scaling Group
  • Now you can see the Auto Scaling is creating and it is also creating the desired state of the EC2 Instance
Auto Scaling is creating
  • We selected the Desired state equal to 4 and you can see the 4 Instance is Running
Auto Scaling is created

Next Article

Similar Reads