Back to results for “Auto Scaling Groups”
AWS › Auto Scaling Groups

What is an Auto Scaling Group in AWS and what problem does it solve?

Beginner

Answer

An Auto Scaling Group is a service that automatically manages a collection of EC2 instances, launching new instances when demand increases and terminating instances when demand decreases, ensuring your application always has the right amount of compute capacity available to handle current traffic while avoiding the cost of running unnecessary idle servers during quiet periods.
aws autoscaling create-auto-scaling-group --auto-scaling-group-name my-asg --min-size 2 --max-size 10 --desired-capacity 2 --launch-template LaunchTemplateName=my-template
Real-world example An online retailer configures an Auto Scaling Group for its web servers so that during a big sale event, more instances launch automatically to handle the traffic surge, and afterward, unnecessary instances are terminated to save cost.

Common follow-ups: What is the difference between minimum, maximum, and desired capacity?;How does an Auto Scaling Group decide which Availability Zone to launch instances in?