All Products
Search
Document Center

Auto Scaling:Event-triggered task

Last Updated:Jun 10, 2026

An event-triggered task lets you manually execute a scaling rule or adjust the instance count in a scaling group in response to specific business events.

Use the following APIs to trigger scaling actions programmatically. Unlike scheduled tasks, which run on a fixed timetable, these APIs let you initiate scaling in direct response to application events—such as a traffic spike detected by your monitoring system, a deployment pipeline step, or a custom business trigger.

APIs in this category

API

Description

ExecuteScalingRule

Executes a specified scaling rule immediately.

ScaleWithAdjustment

Adjusts the instance count of a scaling group by a specified amount, without requiring a pre-defined scaling rule.

AttachInstances

Adds existing ECS instances to a scaling group.

RemoveInstances

Removes and releases ECS instances from a scaling group.

DetachInstances

Detaches ECS instances from a scaling group without releasing them.

How it works

When you call any of these APIs, Auto Scaling processes the request and executes the corresponding scaling activity. The scaling group must be in the Active state, and no other scaling activity can be in progress at the time of the call.

If the request would push the instance count outside the minimum or maximum bounds defined for the scaling group, Auto Scaling adjusts the result to stay within those bounds.