Auto Scaling executes a scaling rule to add or remove ECS instances by using scheduled tasks. This topic describes how to automatically add ECS instances to a scaling group. Two ECS instances are added to a scaling group in this topic.
Step 1: Create a scaling rule
- Log on to the Auto Scaling console.
- In the left-side navigation pane, click Scaling Groups.
- Find the scaling group and use one of the following methods to open the details page
of the scaling group:
- Click the ID of the scaling group in the Scaling Group Name/ID column.
- Click Details in the Actions column.
- In the upper part of the page, click the Scaling Rules tab.
- In the upper-left corner of the Scaling Rules tab, click Create Scaling Rule.
- Configure parameters for the scaling rule and click OK.The following table describes the parameters used in this example. For parameters that are not described in the following table, use the default values.
Parameter Example Rule Name Add2 Rule Type Simple Scaling Rule Operation Add 2 Instances
Step 2: Create a scheduled task
- In the left-side navigation pane, choose .
- In the upper-left corner of the Scheduled Tasks page, click Create Scheduled Task.
- Configure parameters for the scheduled task and click OK.The following table describes the parameters used in this example. For parameters that are not described in the following table, use the default values.
Parameter Example Description Task Name ScheduledScalingOut None Description Add two ECS instances at the scheduled time. None Executed At 2019-11-11 16:35 Five minutes after the current time. Scaling Group MyFirstScalingGroup Executes the scheduled task for the MyFirstScalingGroup scaling group. Scaling Method Select an existing rule None Simple Scaling Rule Add2 Executes the Add2 scaling rule to add two ECS instances to the scaling group.