Turning off Amazon ECS cluster auto scaling
You turn off cluster auto scaling when you need more granular control of the EC2 instances that are registered to your cluster,
To turn off cluster auto scaling for a cluster, you can either disassociate the capacity provider with managed scaling turned on from the cluster or update the capacity provider to turn off managed scaling.
Disassociate the capacity provider
Use the following steps to disassociate a capacity provider with a cluster.
-
Use the
put-cluster-capacity-providerscommand to disassociate the Auto Scaling group capacity provider with the cluster. The cluster can keep the association with the Amazon Fargate capacity providers. For more information, seeput-cluster-capacity-providersin the Amazon CLI Command Reference.aws ecs put-cluster-capacity-providers \ --clusterClusterName\ --capacity-providers FARGATE FARGATE_SPOT \ --default-capacity-provider-strategy '[]'Use the
put-cluster-capacity-providerscommand to disassociate the Auto Scaling group capacity provider with the cluster. For more information, seeput-cluster-capacity-providersin the Amazon CLI Command Reference.aws ecs put-cluster-capacity-providers \ --clusterClusterName\ --capacity-providers [] \ --default-capacity-provider-strategy '[]' -
Use the
describe-clusterscommand to verify that the disassociation was successful. For more information, seedescribe-clustersin the Amazon CLI Command Reference.aws ecs describe-clusters \ --clusterClusterName\ --include ATTACHMENTS
Turn off managed scaling for the capacity provider
Use the following steps to turn off managed scaling for the capacity provider.
-
Use the
update-capacity-providercommand to turn off managed auto scaling for the capacity provider. For more information, seeupdate-capacity-providerin the Amazon CLI Command Reference.aws ecs update-capacity-provider \ --nameCapacityProviderName\ --auto-scaling-group-provider "managedScaling={status=DISABLED}"