2026/01/20 - Auto Scaling - 1 updated api methods
Changes This release adds support for three new filters when describing scaling activities, StartTimeLowerBound, StartTimeUpperBound, and Status.
{'Filters': [{'Name': 'string', 'Values': ['string']}]}
Gets information about the scaling activities in the account and Region.
When scaling events occur, you see a record of the scaling activity in the scaling activities. For more information, see Verify a scaling activity for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.
If the scaling event succeeds, the value of the StatusCode element in the response is Successful. If an attempt to launch instances failed, the StatusCode value is Failed or Cancelled and the StatusMessage element in the response indicates the cause of the failure. For help interpreting the StatusMessage, see Troubleshooting Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.
See also: AWS API Documentation
Request Syntax
client.describe_scaling_activities(
ActivityIds=[
'string',
],
AutoScalingGroupName='string',
IncludeDeletedGroups=True|False,
MaxRecords=123,
NextToken='string',
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
]
)
list
The activity IDs of the desired scaling activities. If unknown activity IDs are requested, they are ignored with no error. Only activities started within the last six weeks can be returned regardless of the activity IDs specified. If other filters are specified with the request, only results matching all filter criteria can be returned.
Array Members: Maximum number of 50 IDs.
(string) --
string
The name of the Auto Scaling group.
boolean
Indicates whether to include scaling activity from deleted Auto Scaling groups.
integer
The maximum number of items to return with this call. The default value is 100 and the maximum value is 100.
string
The token for the next set of items to return. (You received this token from a previous call.)
list
One or more filters to limit the results based on specific criteria. The following filters are supported:
StartTimeLowerBound - The earliest scaling activities to return based on the activity start time. Scaling activities with a start time earlier than this value are not included in the results. Only activities started within the last six weeks can be returned regardless of the value specified.
StartTimeUpperBound - The latest scaling activities to return based on the activity start time. Scaling activities with a start time later than this value are not included in the results. Only activities started within the last six weeks can be returned regardless of the value specified.
Status - The StatusCode value of the scaling activity. This filter can only be used in combination with the AutoScalingGroupName parameter. For valid StatusCode values, see Activity in the Amazon EC2 Auto Scaling API Reference.
(dict) --
Describes a filter that is used to return a more specific list of results from a describe operation.
If you specify multiple filters, the filters are automatically logically joined with an AND, and the request returns only the results that match all of the specified filters.
For more information, see Tag Auto Scaling groups and instances in the Amazon EC2 Auto Scaling User Guide.
Name (string) --
The name of the filter.
The valid values for Name depend on which API operation you're using with the filter.
Valid values for Name include the following:
tag-key - Accepts tag keys. The results only include information about the Auto Scaling groups associated with these tag keys.
tag-value - Accepts tag values. The results only include information about the Auto Scaling groups associated with these tag values.
tag:<key> - Accepts the key/value combination of the tag. Use the tag key in the filter name and the tag value as the filter value. The results only include information about the Auto Scaling groups associated with the specified key/value combination.
Valid values for Name include the following:
auto-scaling-group - Accepts the names of Auto Scaling groups. The results only include information about the tags associated with these Auto Scaling groups.
key - Accepts tag keys. The results only include information about the tags associated with these tag keys.
value - Accepts tag values. The results only include information about the tags associated with these tag values.
propagate-at-launch - Accepts a Boolean value, which specifies whether tags propagate to instances at launch. The results only include information about the tags associated with the specified Boolean value.
Valid values for Name include the following:
StartTimeLowerBound - The earliest scaling activities to return based on the activity start time. Scaling activities with a start time earlier than this value are not included in the results. Only activities started within the last six weeks can be returned regardless of the value specified.
StartTimeUpperBound - The latest scaling activities to return based on the activity start time. Scaling activities with a start time later than this value are not included in the results. Only activities started within the last six weeks can be returned regardless of the value specified.
Status - The StatusCode value of the scaling activity. This filter can only be used in combination with the AutoScalingGroupName parameter. For valid StatusCode values, see Activity in the Amazon EC2 Auto Scaling API Reference.
Values (list) --
One or more filter values. Filter values are case-sensitive.
If you specify multiple values for a filter, the values are automatically logically joined with an OR, and the request returns all results that match any of the specified values.
DescribeAutoScalingGroups example: Specify "tag:environment" for the filter name and "production,development" for the filter values to find Auto Scaling groups with the tag "environment=production" or "environment=development".
DescribeScalingActivities example: Specify "Status" for the filter name and "Successful,Failed" for the filter values to find scaling activities with a status of either "Successful" or "Failed".
(string) --
dict
Response Syntax
{
'Activities': [
{
'ActivityId': 'string',
'AutoScalingGroupName': 'string',
'Description': 'string',
'Cause': 'string',
'StartTime': datetime(2015, 1, 1),
'EndTime': datetime(2015, 1, 1),
'StatusCode': 'PendingSpotBidPlacement'|'WaitingForSpotInstanceRequestId'|'WaitingForSpotInstanceId'|'WaitingForInstanceId'|'PreInService'|'InProgress'|'WaitingForELBConnectionDraining'|'MidLifecycleAction'|'WaitingForInstanceWarmup'|'Successful'|'Failed'|'Cancelled'|'WaitingForConnectionDraining'|'WaitingForInPlaceUpdateToStart'|'WaitingForInPlaceUpdateToFinalize'|'InPlaceUpdateInProgress',
'StatusMessage': 'string',
'Progress': 123,
'Details': 'string',
'AutoScalingGroupState': 'string',
'AutoScalingGroupARN': 'string'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
Activities (list) --
The scaling activities. Activities are sorted by start time. Activities still in progress are described first.
(dict) --
Describes scaling activity, which is a long-running process that represents a change to your Auto Scaling group, such as changing its size or replacing an instance.
ActivityId (string) --
The ID of the activity.
AutoScalingGroupName (string) --
The name of the Auto Scaling group.
Description (string) --
A friendly, more verbose description of the activity.
Cause (string) --
The reason the activity began.
StartTime (datetime) --
The start time of the activity.
EndTime (datetime) --
The end time of the activity.
StatusCode (string) --
The current status of the activity.
StatusMessage (string) --
A friendly, more verbose description of the activity status.
Progress (integer) --
A value between 0 and 100 that indicates the progress of the activity.
Details (string) --
The details about the activity.
AutoScalingGroupState (string) --
The state of the Auto Scaling group, which is either InService or Deleted.
AutoScalingGroupARN (string) --
The Amazon Resource Name (ARN) of the Auto Scaling group.
NextToken (string) --
A string that indicates that the response contains more items than can be returned in a single response. To receive additional items, specify this string for the NextToken value when requesting the next set of items. This value is null when there are no more items to return.