Teardown
Teardown removes all AWS
Amazon Web Services — cloud platform for ingest, processing, storage, API, and portal hosting in this walkthrough. resources provisioned by Terraform
HashiCorp Terraform — provisions all platform infrastructure through five modules in `terraform/`. . The S3 data lake
Private S3 bucket holding raw RINEX under `raw/rinexhourly/` and processed TEC output under `processed/tec/`. bucket must be emptied before deletion if it contains objects.
Step 1 — Empty the data lake bucket
Section titled “Step 1 — Empty the data lake bucket”From the demo repo root:
aws s3 rm "s3://$(terraform -chdir=terraform output -raw bucket_name)" --recursiveIf you already know the bucket name:
aws s3 rm s3://<bucket-name> --recursiveStep 2 — Destroy Terraform resources
Section titled “Step 2 — Destroy Terraform resources”terraform -chdir=terraform destroy -var="region=ap-southeast-2"Type yes to confirm. Terraform removes resources in reverse dependency order across all five modules.
If destroy fails on S3
Section titled “If destroy fails on S3”The bucket must be empty. Re-run the S3 rm command, then destroy again:
aws s3 rm "s3://$(terraform -chdir=terraform output -raw bucket_name)" --recursiveterraform -chdir=terraform destroy -var="region=ap-southeast-2"ECR images
Section titled “ECR images”Terraform destroy removes the ECR
Amazon Elastic Container Registry — stores the mirrored processor Lambda container image at deploy time. repository. Orphaned images in other regions or manual copies are not affected.
SNS subscriptions
Section titled “SNS subscriptions”Email SNS
Amazon Simple Notification Service — publishes CloudWatch alarm notifications; subscribe an email endpoint after deploy. subscriptions are removed with the topic. No separate unsubscribe step is required.
Verify cleanup
Section titled “Verify cleanup”terraform -chdir=terraform outputaws s3 ls "s3://$(terraform -chdir=terraform output -raw bucket_name)" 2>&1 || echo "Bucket removed or inaccessible"After successful destroy, terraform output should report no state or empty outputs.