What is an Auto Scaling Group (ASG)?

An Auto Scaling Group (ASG) automatically manages the number of EC2 instances in a group to maintain application performance and availability.

It ensures you always have the right number of instances running based on demand.

Why ASG?

Example (kaptaindevops):

His app traffic spikes during office hours. ASG launches more EC2s automatically and scales down at night to save cost.


ASG Components

Component Description
Launch Template Blueprint for EC2 (AMI, instance type, security, etc.)
Desired Capacity Target number of instances
Minimum Capacity Minimum instances to run
Maximum Capacity Upper limit of scaling
Health Checks Replace unhealthy instances automatically

Scaling Policies

1. Target Tracking Scaling

Example: