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

Deleting a Cluster

If you are finished using a cluster, you can delete it. When you delete a cluster in the Amazon ECS console, the associated resources that are deleted with it vary depending on how the cluster was created. Step 5 of the following procedure changes based on that condition.

If your cluster was created with the console first-run experience described in Getting Started with Amazon ECS after November 24th, 2015, or the cluster creation wizard described in Creating a Cluster, then the AWS CloudFormation stack that was created for your cluster is also deleted when you delete your cluster.

If your cluster was created manually (without the cluster creation wizard) or with the console first run experience prior to November 24th, 2015, then you must deregister (or terminate) any container instances associated with the cluster before you can delete it. For more information, see Deregister a Container Instance. In this case, after the cluster is deleted, you should delete any remaining AWS CloudFormation stack resources or Auto Scaling groups associated with the cluster to avoid incurring any future charges for those resources. For more information, see Delete the AWS CloudFormation Stack.

To delete a cluster

  1. Open the Amazon ECS console at https://console.aws.amazon.com/ecs/.

  2. From the navigation bar, select the region to use.

    Note

    Amazon ECS is available in the following regions:

    Region Name Region
    US East (N. Virginia) us-east-1
    US East (Ohio) us-east-2
    US West (N. California) us-west-1
    US West (Oregon) us-west-2
    EU (Ireland) eu-west-1
    EU (London) eu-west-2
    EU (Frankfurt) eu-central-1
    Asia Pacific (Tokyo) ap-northeast-1
    Asia Pacific (Singapore) ap-southeast-1
    Asia Pacific (Sydney) ap-southeast-2
    Canada (Central) ca-central-1

  3. In the navigation pane, choose Clusters.

  4. On the Clusters page, choose the cluster you want to delete.

    Note

    If your cluster has registered container instances, you must deregister or terminate them. For more information, see Deregister a Container Instance.

  5. Choose Delete Cluster to delete the cluster. You will see one of two confirmation prompts:

    • Deleting the cluster also deletes the CloudFormation stack EC2ContainerService-cluster_name: Deleting this cluster cleans up the associated resources that were created with the cluster, including Auto Scaling groups, VPCs or load balancers.

    • Deleting the cluster does not affect CloudFormation resources...: Deleting this cluster does not clean up any resources that are associated with the cluster, including Auto Scaling groups, VPCs or load balancers. Also, any container instances that are registered with this cluster must be deregistered or terminated before you can delete the cluster; for more information, see Deregister a Container Instance. You can visit the AWS CloudFormation console at https://console.aws.amazon.com/cloudformation/ to update or delete any of these resources; for more information, see Delete the AWS CloudFormation Stack.