Resource Cleanup

6. Resource Cleanup

Congratulations on completing the workshop! Now, let’s proceed with cleaning up resources to avoid unnecessary costs.

The cleanup process will follow this order: Delete Table > Delete Namespace > Delete S3 Table Bucket > Delete EC2 Instance > Delete Security Group > Delete VPC > Delete IAM Role.

Start by SSHing into your EC2 instance.

  1. Delete Table

    Replace <arn:aws:s3tables:us-east-1:123456789012:bucket/jbarr-table-bucket-2> with your bucket’s ARN.

aws s3tables delete-table \
--table-bucket-arn <arn:aws:s3tables:us-east-1:123456789012:bucket/jbarr-table-bucket-2> \
--namespace mydata --name table1
  1. Delete Namespace
aws s3tables delete-namespace \
--table-bucket-arn <arn:aws:s3tables:us-east-1:123456789012:bucket/jbarr-table-bucket-2> \
--namespace mydata
  1. Delete S3 Table Buckets
aws s3tables delete-table-bucket \
--table-bucket-arn <arn:aws:s3tables:us-east-1:123456789012:bucket/jbarr-table-bucket-2>

delete-s3-table-buckets

  1. Delete EC2 Instance

    Go to the EC2 Dashboard, select your EC2 instance, and use the “Terminate” action to delete the instance.

delete-ec2-instance-1

delete-ec2-instance-2

  1. Delete Security Group

    Go to the VPC Dashboard, select “Security Groups” in the left navigation pane, select the demo-s3-tables-sg security group, click on the dropdown actions, and select “Delete Security Group.”

delete-sg

  1. Delete VPC

    Go to the VPC Dashboard, select “Your VPCs,” choose the demo-s3-table-vpc, click on the dropdown actions, select “Delete VPC,” type delete to confirm, and proceed with the deletion.

delete-vpc-1

delete-vpc-2

  1. Delete IAM Role

    Go to the IAM Service Dashboard, select “Roles” in the left navigation pane, search for ec2-s3-tables-role, and select “Delete.”

delete-iam-role


Congratulations again! If you encounter any issues or need assistance troubleshooting, feel free to reach out to me via LinkedIn or email me at nghialm2603@gmail.com.