Cleanup resources

We will proceed with the following steps to delete the resources we created in this lab.

Delete EC2 instances

  1. Access the EC2 service management console
  • Click Instances.
  • Click select both instances Public Linux Instance and Private Windows Instance.
  • Click Instance state.
  • Click Terminate instance. Clean
  • Then click Terminate to confirm. Clean
  1. Access the IAM service management console
  • Click Roles.
  • In the search box, enter SSM.
  • Click select SSM-Role.
  • Click Delete. Clean
  • Then enter the role name SSM-Role and click Delete to delete the role. Clean
  1. Click IAM users.
  • Click select the user Portfwd.
  • Click Delete, then click Deactivate access key, enter Confirm and click Delete user to delete the user. Clean Clean Clean

Delete S3 bucket

  1. Access the Systems Manager - Session Manager service console.
  • Click the Preferences tab.
  • Click Edit.
  • Scroll down.
  • In the S3 logging section.
  • Uncheck Enable to turn off the logging feature.
  • Scroll down.
  • Click Save.
  1. Access the S3 service management console
  • Click select the S3 bucket we created for the lab. (Example : lab-fcaj-hieu-bucket-xxxxxxxxxxxx-us-east-1-an)
  • Click Empty.
  • Enter permanently delete, then click Empty to proceed deleting the objects in the bucket.
  • Click Exit.
  1. After deleting all objects in the bucket, click Delete

  2. Enter the S3 bucket name, then click Delete bucket to proceed deleting the S3 bucket.

Delete VPC Endpoints

  1. Access the VPC service management console
  • Click Endpoints.
  • Select the 4 endpoints we created for the lab including SSM, SSMMESSAGES, EC2MESSAGES, S3GW.
  • Click Actions.
  • Click Delete VPC endpoints. Clean
  1. In the confirm box, enter delete.
  • Click Delete to proceed deleting the endpoints.
  1. Click the refresh icon, check that all endpoints have been deleted before proceeding to the next step. Clean

Delete VPC

  1. Access the VPC service management console
  • Click Your VPCs.
  • Click select Lab VPC.
  • Click Actions.
  • Click Delete VPC. Clean
  1. In the confirm box, enter delete to confirm, click Delete to perform deleting the Lab VPC and related resources. Clean