Teardown
Progress checklist
Overview
Section titled “Overview”demo.sh down tears the lab down in order, per Region, then the shared buckets:
- Terminate probe EC2 (wait until terminated)
- Delete SSM + S3 VPC endpoints (wait until gone)
- Delete security groups, instance profile / IAM role
- Disassociate route table, then delete subnet, route table, VPC
- Delete CRR config, empty both versioned buckets, delete buckets
- Delete CRR IAM role and remove
.lab-state.json
It asks for confirmation (y). EC2 calls always pass --region for that
consumer, so a leftover AWS_REGION cannot send Auckland deletes to Sydney.
-
Destroy (type
ywhen prompted):Terminal window export AWS_PROFILE=sandbox./scripts/demo.sh downPrompt + finish from this lab:
Destroy lab resources described in …/.lab-state.json? [y/N] ytearing down consumer syd in ap-southeast-2…tearing down consumer akl in ap-southeast-6…emptying ps3a-artifacts-**ACCOUNT**-syd (ap-southeast-2)emptying ps3a-artifacts-**ACCOUNT**-akl (ap-southeast-6)down complete
Verify
Section titled “Verify”IDs from the lab run that was destroyed (for the checks below):
| Resource | ID |
|---|---|
| Syd instance | i-01d741261020acb67 |
| Akl instance | i-07d5eaa611269b0fa |
| Syd VPC | vpc-0dff201fec9d04249 |
| Akl VPC | vpc-0111bfaa8c2f98387 |
| Primary bucket | ps3a-artifacts-**ACCOUNT**-syd |
| Replica bucket | ps3a-artifacts-**ACCOUNT**-akl |
| CRR role | ps3a-crr-20260904200753 |
-
State file gone:
Terminal window test ! -f .lab-state.json && echo "state cleared"state cleared -
Buckets gone:
Terminal window aws s3api head-bucket --bucket ps3a-artifacts-**ACCOUNT**-syd --region ap-southeast-2aws s3api head-bucket --bucket ps3a-artifacts-**ACCOUNT**-akl --region ap-southeast-6An error occurred (404) when calling the HeadBucket operation: Not FoundAn error occurred (404) when calling the HeadBucket operation: Not Found -
Instances terminated:
Terminal window aws ec2 describe-instances --region ap-southeast-2 \--instance-ids i-01d741261020acb67 \--query 'Reservations[0].Instances[0].State.Name' --output textaws ec2 describe-instances --region ap-southeast-6 \--instance-ids i-07d5eaa611269b0fa \--query 'Reservations[0].Instances[0].State.Name' --output textterminatedterminated -
Lab VPCs gone:
Terminal window aws ec2 describe-vpcs --region ap-southeast-2 --vpc-ids vpc-0dff201fec9d04249aws ec2 describe-vpcs --region ap-southeast-6 --vpc-ids vpc-0111bfaa8c2f98387An error occurred (InvalidVpcID.NotFound) …An error occurred (InvalidVpcID.NotFound) … -
CRR role gone:
Terminal window aws iam get-role --role-name ps3a-crr-20260904200753An error occurred (NoSuchEntity) when calling the GetRole operation: The role with name ps3a-crr-20260904200753 cannot be found.