This topic describes how to switch an Elastic Compute Service (ECS) instance to the Protected state to prevent the ECS instance from being automatically removed from a scaling group. After an ECS instance is switched to the Protected state, the load balancing weight of the ECS instance remains unchanged. If an ECS instance is in the Protected state, Auto Scaling neither checks its health status nor releases it.
- If a Server Load Balancer (SLB) instance is attached to the scaling group to which the ECS instance belongs, the load balancing weight of the ECS instance remains unchanged.
- The ECS instance stays in the Protected state until you manually remove it from the Protected state.
- If a scale-in activity is triggered when the number of ECS instances in the scaling group changes or a monitoring task detects triggers, Auto Scaling skips this ECS instance when selecting the ECS instances to remove. You must remove the ECS instance from the Protected state before Auto Scaling can remove the ECS instance from the scaling group and release it.
- When the ECS instance is stopped or restarted, its health check status remains unchanged.
- Log on to the Auto Scaling console.
- In the left-side navigation pane, click Scaling Groups.
- In the top navigation bar, select a region.
- You can use either of the following methods to open the details page of a scaling
- In the Scaling Group Name/ID column, click a scaling group name.
- Click Manage in the Actions column corresponding to a scaling group.
- In the left-side navigation pane, click ECS Instances.
- Select the source of the ECS instance.
- To select an automatically created ECS instance, click the Auto Created tab.
- To select a manually added ECS instance, click the Manually Added tab.
- Switch one or more ECS instances to the Protected state.
- To switch a single ECS instance to the Protected state, find the target ECS instance and choose Actions column. in the
- To switch multiple ECS instances to the Protected state at the same time, select the target ECS instances and click Switch to Protected State under the ECS instance list.
- Click OK.