Amazon Elastic Container Service
Developer Guide (API Version 2014-11-13)

Scaling a Cluster

If you have a cluster that contains Amazon EC2 container instances, the following helps you scale the number of Amazon EC2 instances in your cluster.


Clusters with Fargate tasks can be scaled using Service Auto Scaling. For more information, see Service Auto Scaling.

If your cluster was created with the console first-run experience after November 24, 2015, then the Auto Scaling group associated with the AWS CloudFormation stack created for your cluster can be scaled up or down to add or remove container instances. You can perform this scaling operation from within the Amazon ECS console.

If your cluster was not created with the console first-run experience after November 24, 2015, then you cannot scale your cluster from the Amazon ECS console. However, you can still modify existing Auto Scaling groups associated with your cluster in the Auto Scaling console. If you do not have an Auto Scaling group associated with your cluster, you can create one from an existing container instance. For more information, see Creating an Auto Scaling Group Using an EC2 Instance in the Amazon EC2 Auto Scaling User Guide. You can also manually launch or terminate container instances from the Amazon EC2 console; for more information see Launching an Amazon ECS Container Instance.

To scale a cluster

  1. Open the Amazon ECS console at

  2. From the navigation bar, choose the Region in which your cluster exists.

  3. In the navigation pane, choose Clusters and select the cluster to scale.

  4. On the Cluster : name page, choose ECS Instances.

                        ECS scale cluster

    If a Scale ECS Instances button appears, then you can scale your cluster in the next step. If not, you must manually adjust your Auto Scaling group to scale up or down your instances, or you can manually launch or terminate your container instances in the Amazon EC2 console.

  5. Choose Scale ECS Instances.

  6. For Desired number of instances, enter the number of instances to which to scale your cluster to and choose Scale.


    If you reduce the number of container instances in your cluster, randomly selected container instances are terminated until the desired count is achieved, and any tasks that are running on terminated instances are stopped.