You can remove an ECS instance from a specified scaling group.
When an automatically created ECS instance is removed from a scaling group, the instance is stopped and released.
When a manually added ECS instance is removed from a scaling group, the instance is not stopped or released.
The operation will succeed under the following conditions:
- The scaling group is active.
- The scaling group is not executing any scaling activity.
When no scaling activity is being executed for the scaling group, removing an ECS instance is executed directly without waiting for the cool-down time.
A successful return indicates that the Auto Scaling service will shortly execute the scaling activity, but it does not mean that the scaling activity will be successfully executed. Use the returned ScalingActivityID to check the scaling activity status.
If the number of existing ECS instances in the scaling group (Total Capacity) minus the number of ECS instances to be removed is less than the MinSize value, the operation fails.