Cleanup resources
We will proceed with the following steps to delete the resources we created in this lab.
Delete EC2 instances
- 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.

- Then click Terminate to confirm.

- Access the IAM service management console
- Click Roles.
- In the search box, enter SSM.
- Click select SSM-Role.
- Click Delete.

- Then enter the role name SSM-Role and click Delete to delete the role.

- 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.

Delete S3 bucket
- 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.
- 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.
After deleting all objects in the bucket, click Delete
Enter the S3 bucket name, then click Delete bucket to proceed deleting the S3 bucket.
Delete VPC Endpoints
- 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.

- In the confirm box, enter delete.
- Click Delete to proceed deleting the endpoints.
- Click the refresh icon, check that all endpoints have been deleted before proceeding to the next step.

Delete VPC
- Access the VPC service management console
- Click Your VPCs.
- Click select Lab VPC.
- Click Actions.
- Click Delete VPC.

- In the confirm box, enter delete to confirm, click Delete to perform deleting the Lab VPC and related resources.
