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-providers
command 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-providers
in the Amazon CLI Command Reference.aws ecs put-cluster-capacity-providers \ --cluster
ClusterName
\ --capacity-providers FARGATE FARGATE_SPOT \ --default-capacity-provider-strategy '[]'Use the
put-cluster-capacity-providers
command to disassociate the Auto Scaling group capacity provider with the cluster. For more information, seeput-cluster-capacity-providers
in the Amazon CLI Command Reference.aws ecs put-cluster-capacity-providers \ --cluster
ClusterName
\ --capacity-providers [] \ --default-capacity-provider-strategy '[]' -
Use the
describe-clusters
command to verify that the disassociation was successful. For more information, seedescribe-clusters
in the Amazon CLI Command Reference.aws ecs describe-clusters \ --cluster
ClusterName
\ --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-provider
command to turn off managed auto scaling for the capacity provider. For more information, seeupdate-capacity-provider
in the Amazon CLI Command Reference.aws ecs update-capacity-provider \ --capacity-providers
CapacityProviderName
\ --auto-scaling-group-provider managedScaling=DISABLED