Why did my Auto Scaling group scale down?

Last updated: 2020-12-21

My Auto Scaling group scaled down without my intervention. Why did this happen?

Short description

Scale-downs are user initiated, or triggered by configured scale-down policies and scheduled scaling. When a scale-down occurs, an instance is terminated according to the configured termination policy.

Resolution

View your Auto Scaling group scaling history in the Amazon EC2 console, using the AWS Command Line Interface (AWS CLI), or using the AWS API.

Note: If you receive errors when running AWS CLI commands, make sure that you’re using the most recent version of the AWS CLI.

Policy-based scale down

If your Auto Scaling group scales down because of a scale-down policy, a message similar to the following appears in the scaling history:

At 2016-05-08T13:55:14Z a monitor alarm My-Scale-Down-Alarm in state ALARM
triggered policy Decrease Group Size changing the desired capacity from 4 to 3.

You can adjust your Auto Scaling group scaling policy using the Amazon EC2 console or with the AWS CLI put-scaling-policy command. To configure when a scale-down occurs, adjust the associated Amazon CloudWatch alarm. Or, create a new alarm and then associate the new alarm with the Auto Scaling group scaling policy.

User-initiated scale down

A scale-down triggered by a user displays an event similar to the following in the scaling history:

At 2016-05-13T15:03:47Z a user request update of AutoScalingGroup constraints
to min: 12, max: 20, desired: 13 changing the desired capacity from 14 to 13.

You can determine the user that made the API call by viewing your AWS CloudTrail logs.

Note: CloudTrail must be configured and enabled before you can begin recording API calls.

Scheduled scaling

A scale-down initiated by a scheduled scale down action displays an event similar to the following in the scaling history:

At 2016-02-12T16:01:25Z a scheduled action update of AutoScalingGroup constraints
to min: 1, max: 5, desired: 2 changing the desired capacity from 3 to 2. At
2016-02-12T16:01:25Z the scheduled action ScaleDown executed. Setting max size
from 1 to 5. Setting desired capacity from 3 to 2.

To view scheduled scaling using the AWS CLI, run the following command. Replace MY-ASG-NAME with the name of your Auto Scaling group.

aws autoscaling describe-scheduled-actions --auto-scaling-group-name MY-ASG-NAME

You can also view and manage scheduled scaling using the Amazon EC2 console. For more information, see Create and manage scheduled actions (console).

For more information about schedule-based Amazon EC2 Auto Scaling, see Scheduled scaling.