Clean up resources

After completing this lab, we will need to delete all resources that were created before.

Delete service in cluster

  • In the ECS cluster
  • Choose service: d-cluster-web-app
  • Click Delete service dl-server-in-cluster
  • Check Force delete
  • Click Delete dl-server-in-cluster

Delete cluster & task definition

  • In ECS
  • Choose cluster: d-ecs-web-app
  • Click Delete cluster dl-cluster-ecs
  • Type: delete d-ecs-web-app
  • Click Delete dl-cluster-ecs

Task definition

  • In a Task Definition
  • Choose: d-task-definition-web-app
  • Actions: Deregister dl-task-definition
  • Click Deregister dl-task-definition

Delete ECR repository

  • In the ECR repositories
  • Choose: d-ecr-web-app
  • Click: Delete dl-ecr-repository
  • Confirm Delete dl-ecr-repository

Delete Load Balancer

  • In a Load Balancers
  • Choose: d-alb-web-app
  • Actions: Delete load balancer dl-alb
  • Type: Confirm
  • Click Delete dl-alb

Delete Target group

  • In a Target group
  • Choose: d-tg-web-app
  • Actions: Delete dl-tg
  • Click Yes,Delete dl-tg

Terminate EC2(Bastion-host)

  • In an instances
  • Choose: d-ec2-bastion-host
  • Instance state: Terminate (delete) instance ec2

Delete VPC(NGW, IGW, Elastis IP, VPC)

NAT gateways
  • Name: d-vpc-01-nat-public-ap-southeast-1a
  • Actions: Delete NAT gateway dl-ngw
  • Type: delete
  • Click Delete dl-ngw
Detach Internet Gateways
  • Name: d-vpc-01-igw
  • Actions: Detach from VPC dl-igw
  • Click Detach internet gateway dl-igw
Release Elastic IP
  • Name: d-vpc-01-eip-ap-southeast-1a
  • Actions: Release Elastis IP addresses dl-elastic IP
  • Click Release dl-elastic IP
Delete VPC
  • Name: d-vpc-01-vpc
  • Actions: Delete VPC dl-vpc
  • Confirm deletion
  • Click Delete dl-vpc