Resource Cleanup

Cleaning Up on the AWS Console

First, you need to access the AWS console to delete the services you previously created manually.

  • In the console, search for CloudFormation.
  • Select Stacks.
  • Choose the 2 Services you created and click Delete.

image

  • Click Delete.

image

  • Wait approximately 5 to 10 minutes for the deletion process to complete.

image

  • Go back to the ECS cluster to check if the service has been deleted.

image

Cleaning Up with Terraform Commands

Since the resources in the infrastructure were created by Terraform, you can conveniently delete all resources with a single command instead of manually removing each one.

Now, go back to the location where you initially deployed the infrastructure with Terraform.

  • Use the command below to delete resources.
terraform destroy

image

  • Type yes to confirm.

image

  • Wait approximately 15 to 20 minutes for all resources to be deleted.

image

  • After a successful deletion, return to the AWS console to verify that all resources have been removed.

image