Amazon Elastic Container Service (AWS ECS)

Working with AWS ECS

Demo Deleting cluster

In this lesson, you'll learn how to delete all resources in your Amazon ECS environment to start fresh without using the quick start wizard. After confirming that your application deployed successfully, follow these steps to remove the active service and delete the cluster.

Step 1: Remove the Active Service

First, navigate to your default cluster and locate the active service you want to remove.

The image shows an AWS ECS console displaying details of a cluster named "default," with one active service called "ecs-project1-service" running on Fargate.

Select the desired service and initiate the deletion process. When the system prompts you for confirmation, type "delete me" in the provided text box. The deletion process may take a few seconds. You should see that all corresponding tasks are automatically terminated; if any tasks remain running, you can delete them manually.

Note

After deleting the service, ensure there are no orphaned tasks before proceeding to delete the cluster.

Step 2: Delete the Cluster

Once the service has been removed, return to the default cluster view to delete the cluster itself.

The image shows a confirmation dialog for deleting a cluster in a cloud management interface, with a progress bar indicating the deletion of resources and a text box to confirm the action by typing "delete me."

Confirm the deletion, and the cluster removal will begin. You will receive a confirmation message once the process is complete.

The image shows an Amazon ECS (Elastic Container Service) dashboard with a notification indicating that a cluster was deleted successfully. There are no clusters currently found, and options to create a new cluster or get started are available.

Completion

Your ECS environment is now cleared. You can deploy your applications from scratch without any interference from previously deployed resources.

For more detailed information on managing ECS resources, refer to the Amazon ECS Documentation.

Watch Video

Watch video content

Previous
Understanding project configuration