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

ecs-cli down

Description

Deletes the AWS CloudFormation stack that was created by ecs-cli up and the associated resources. The --force option is required.

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.

The ecs-cli down command attempts to delete the cluster specified in ~/.ecs/config. However, if there are any active services (even with a desired count of 0) or registered container instances in your cluster that were not created by ecs-cli up, the cluster is not deleted and the services and pre-existing container instances remain active. This might happen, for example, if you used an existing ECS cluster with registered container instances, such as the default cluster.

If you have remaining services or container instances in your cluster that you would like to remove, you can follow the procedures in Cleaning Up your Amazon ECS Resources to remove them and then delete your cluster.

Syntax

ecs-cli down --force [--cluster cluster_name] [--region region] [--help]

Options

Name Description

--force, -f

Acknowledges that this command permanently deletes resources.

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

--cluster-config cluster_config_name

Specifies the name of the ECS cluster configuration to use. Defaults to the cluster configuration set as the default.

Type: String

Required: No

--ecs-profile ecs_profile

Specifies the name of the ECS profile configuration to use. Defaults to the profile configured using the configure profile command.

Type: String

Required: No

--aws-profile aws_profile

Specifies the AWS profile to use. Enables you to use the AWS credentials from an existing named profile in ~/.aws/credentials.

Type: String

Required: No

--help, -h

Shows the help text for the specified command.

Required: No

Examples

Example

This example deletes a cluster.

Copy
ecs-cli down --force

Output:

INFO[0001] Waiting for your cluster resources to be deleted
INFO[0001] Cloudformation stack status                   stackStatus=DELETE_IN_PROGRESS
INFO[0062] Cloudformation stack status                   stackStatus=DELETE_IN_PROGRESS
INFO[0123] Cloudformation stack status                   stackStatus=DELETE_IN_PROGRESS
INFO[0154] Deleted cluster