Skip to content

Cleanup checklist

Progress checklist

Run after Tear down — both ./scripts/demo.sh down and ./scripts/image.sh down. Lab names start with s3x-hotlookup- (directory buckets also contain --apse2-az1--x-s3).

demo.sh down does not remove the durable image stack (ECR, CodeBuild, its source bucket). That is a separate confirm on Tear down.

Terminal window
export AWS_PROFILE=sandbox
export AWS_REGION=ap-southeast-2
export PREFIX=s3x-hotlookup-
aws ec2 describe-instances \
--filters "Name=tag:Project,Values=s3-express-hot-lookup-walkthrough" \
"Name=instance-state-name,Values=pending,running,stopping,stopped" \
--query "Reservations[].Instances[].{Id:InstanceId,Name:Tags[?Key=='Name']|[0].Value}"
aws s3api list-buckets --query "Buckets[?starts_with(Name, '${PREFIX}')].Name"
aws ec2 describe-vpcs \
--filters "Name=tag:Project,Values=s3-express-hot-lookup-walkthrough" \
--query "Vpcs[].{Id:VpcId,Cidr:CidrBlock,Name:Tags[?Key=='Name']|[0].Value}"
aws ec2 describe-vpc-endpoints \
--filters "Name=tag:Project,Values=s3-express-hot-lookup-walkthrough" \
--query "VpcEndpoints[].{Id:VpcEndpointId,Service:ServiceName,State:State}"
aws ec2 describe-security-groups \
--filters "Name=tag:Project,Values=s3-express-hot-lookup-walkthrough" \
--query "SecurityGroups[].{Id:GroupId,Name:GroupName}"
aws iam list-roles --query "Roles[?starts_with(RoleName, '${PREFIX}')].RoleName"
aws iam list-instance-profiles \
--query "InstanceProfiles[?starts_with(InstanceProfileName, '${PREFIX}')].InstanceProfileName"
ResourceGone when
EC2 instanceNot running / not listed with lab tag
Standard + directory bucketsNot listed (…--apse2-az1--x-s3 for Express)
VPC / subnet / IGW / SG / endpointsNot listed with lab Project tag
Role / instance profileNot listed
.lab-state.jsonDeleted locally
.lab/Removed locally

Required for a clean account (already covered on Tear down; re-run if you skipped it):

Terminal window
export S3X_LAB_ALLOW_AWS=1
./scripts/image.sh status
./scripts/image.sh down
ResourceGone when
ECR repo s3x-hotlookup-harnessDeleted
CodeBuild project / role / source bucketDeleted by image.sh down
.image-state.jsonDeleted locally