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

ecs-cli scale

Description

Modifies the number of container instances in your cluster. This command changes the desired and maximum instance count in the Auto Scaling group created by the ecs-cli up command. You can use this command to scale out (increase the number of instances) or scale in (decrease the number of instances) your cluster.

Note

The Amazon ECS CLI can only manage tasks, services, and container instances that were created with the CLI. To manage tasks, services, and container instances that were not created by the Amazon ECS CLI, use the AWS Command Line Interface or the AWS Management Console.

Syntax

ecs-cli scale --capability-iam --size n [--cluster cluster_name] [--region region] [--help]

Options

Name Description

--capability-iam

Acknowledges that this command may create IAM resources.

Required: Yes

--size n

Specifies the number of instances to maintain in your cluster.

Type: Integer

Required: Yes

--cluster, -c cluster_name

Specifies the ECS cluster name to use. Defaults to the cluster configured using the configure command.

Type: String

Required: No

--region, -r region

Specifies the AWS region to use. Defaults to the cluster configured using the configure command.

Type: String

Required: No

--help, -h

Shows the help text for the specified command.

Required: No

Examples

Example

This example scales the current cluster to two container instances.

Copy
ecs-cli scale --capability-iam --size 2

Output:

INFO[0001] Waiting for your cluster resources to be updated
INFO[0001] Cloudformation stack status                   stackStatus=UPDATE_IN_PROGRESS