CLOUD / A CONCEPT NOTE

Auto Scaling

automatically adjusting compute capacity to match demand

~80 sec read

Overview · mechanism
pitfall · examples

01 / THE SHORT VERSION

The idea in a few sentences.

Auto Scaling monitors metrics like CPU utilization, request count, or queue depth and adjusts the number of running instances accordingly. You define a min, max, and desired capacity. When load spikes, new instances launch automatically. When it drops, excess instances are terminated — saving money without manual intervention.

02 / FOLLOW THE MECHANISM

How a scale-out event works

  1. CloudWatch alarm

    triggers when CPU averages > 70% for 5 minutes across the ASG.

  2. Auto Scaling group

    receives the alarm and initiates a scale-out activity.

  3. Launch template

    specifies the AMI, instance type, security groups, and user data for new instances.

  4. New instance

    boots, runs the user data/bootstrap script, and registers with the load balancer.

  5. Cooldown

    the ASG waits for a configured period (default 300s) before evaluating any further scaling actions.

04 / COMMAND NOTES

Read the command, then the result.

Inspect the flags and arguments before trying an example. Snippets can need local setup, replacement values, or resources in your own environment.

EXAMPLE 01 · REFERENCE

list ASGs and their current capacities

aws autoscaling describe-auto-scaling-groups

EXAMPLE 02 · REFERENCE

see recent scale events

aws autoscaling describe-scaling-activities --auto-scaling-group-name my-asg

Explore command anatomy in the CLI lab