DEV Community

Cover image for Understanding Auto Scaling group in AWS
Ashok Naik
Ashok Naik

Posted on

Understanding Auto Scaling group in AWS

One advantage of cloud computing is the ability to only pay for resources that are actually used and to access resources as needed.
Let's look at a Real World Example to better understand the idea of Auto Scaling Groups.
An e-commerce website's users typically conduct their purchases during the day or during special events like holiday sales, so the application anticipates a higher volume of traffic during these times. We employ Auto Scaling Groups to control heavy website traffic.

The Goal of Auto Scaling Groups is to Scale Out (Add more Instances) as the Load Increases

An Auto Scaling group is a collection of Amazon Elastic Compute Cloud (EC2) instances that were produced from a single Amazon Machine Image (AMI). You can set performance goals for your applications with auto-scaling, and it will automatically adjust capacity to meet those goals.

Steps to Create an Auto-Scaling Group

We Need to Specify the Name of the Auto-Scaling Group and create a Launch Template.

We must specify the family-type, key pair, security group, storage volumes, and user data configurations of the AMI EC2 instances that will make up the group in the launch template.

Create Launch Template

Image description

The next step is to select the Availability Zones and Subnets and Attach an Application Load Balancer.

Know more about Load balancers

Template Details

Once an application Load Balancer is attached we need to specify the Scaling Group Policies like Desired Capacity and Min, Max Capacity of Instances to be running in the ASG when there is less load and when there is more load.

Load balancer

We can Add notifications and tags and then Create an auto-scaling group

Polices

After Creation, you can check the target groups which display the health status of the Instance created through ASG

ASG

And if we Manually Terminate an Instance from the EC2 Dashboard the ASG creates another EC2 Instance for us depending upon our desired capacity specified in the Scaling Group Policies.

Scaling Group Policies

Scaling Group Policies

That's all the basic and major features of Auto Scaling Groups (ASG)

Thank you for your time

Top comments (0)