Skip to content

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.

From the demo repo root:

Terminal window
aws s3 rm "s3://$(terraform -chdir=terraform output -raw bucket_name)" --recursive

If you already know the bucket name:

Terminal window
aws s3 rm s3://<bucket-name> --recursive
Terminal window
terraform -chdir=terraform destroy -var="region=ap-southeast-2"

Type yes to confirm. Terraform removes resources in reverse dependency order across all five modules.

The bucket must be empty. Re-run the S3 rm command, then destroy again:

Terminal window
aws s3 rm "s3://$(terraform -chdir=terraform output -raw bucket_name)" --recursive
terraform -chdir=terraform destroy -var="region=ap-southeast-2"

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.

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.

Terminal window
terraform -chdir=terraform output
aws 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.