Updating managed termination protection for Amazon ECS capacity providers
When you use managed termination protection, you need to update the setting for existing capacity providers.
Open the console at https://console.aws.amazon.com/ecs/v2
. -
On the Clusters page, choose the cluster.
-
On the cluster page, chooset the Infrastructure tab.
-
Choose the capacity provider.
-
Choose Update to modify the capacity provider settings.
-
Under Auto Scaling group settings, toggle Managed termination protection to enable or disable the feature.
-
Choose Update.
You can update a capacity provider's managed termination protection setting using the update-capacity-provider command:
To enable managed termination protection:
aws ecs update-capacity-provider \ --nameCapacityProviderName\ --auto-scaling-group-provider "managedScaling={status=ENABLED,targetCapacity=70,minimumScalingStepSize=1,maximumScalingStepSize=10},managedTerminationProtection=ENABLED"
To disable managed termination protection:
aws ecs update-capacity-provider \ --nameCapacityProviderName\ --auto-scaling-group-provider "managedScaling={status=ENABLED,targetCapacity=70,minimumScalingStepSize=1,maximumScalingStepSize=10},managedTerminationProtection=DISABLED"
Note
It might take a few minutes for the changes to take effect across your cluster. When enabling managed termination protection, instances that are already running tasks will be protected from scale-in events. When disabling managed termination protection, the protection flag will be removed from instances during the next ECS capacity provider management cycle.
Open the console at https://console.aws.amazon.com/ecs/v2
. -
On the Clusters page, choose the cluster.
-
On the cluster page, chooset the Tasks tab.
-
Choose the task.
-
Under Configuration, toggle Managed termination protection to enable or disable the feature.
-
Choose Configure task scale-in protection.
The Configure task scale-in protection dialog box displays
Under Task scale-in protection, toggle Turn on.
For Expires in minutes, enter the number of minutes before task scale-in protection ends.
Choose Update