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.

Background information

After an ECS instance is switched to the Protected state:
  • 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.

Procedure

  1. Log on to the Auto Scaling console.
  2. In the left-side navigation pane, click Scaling Groups.
  3. In the top navigation bar, select a region.
  4. You can use either of the following methods to open the details page of a scaling group.
    • In the Scaling Group Name/ID column, click a scaling group name.
    • Click Manage in the Actions column corresponding to a scaling group.
  5. In the left-side navigation pane, click ECS Instances.
  6. 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.
  7. 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 More > Switch to Protected State in the Actions column.
    • 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.
  8. Click OK.