When you'd reach for it
To decommission a deployment normally, delete its CloudFormation stack, run terraform destroy, or click "Destroy" in the dashboard — each drains the deployment gracefully. But if that path is interrupted — a stack wedged in DELETE_FAILED, a terraform destroy that timed out, a gateway that died mid-teardown — some AWS resources can survive and keep billing.
cloudspectra_cleanup is the recovery tool for exactly that: it reaps the deployment's resources directly, in your own account, with your own credentials, with no running gateway required.
Built for a destructive job you can trust
👁 Safe by default
With no flags it only lists what it would delete (a dry run). Deleting requires --force, and --force without --yes prompts you to confirm.
🎯 Scoped to your deployment
Matches resources by the Cloud Spectra owner tag and a delimited name token — it never touches your other resources, or a different deployment that merely shares a name prefix.
🧩 Independent
One self-contained binary — no Python, no dependencies — that runs with your own AWS credentials and needs no live gateway, so it works precisely when the in-product teardown could not.
✅ Complete
Removes the full footprint: VPC, subnets, gateways, ENIs, EIPs; GWLB and endpoint services; instances, ASGs, launch templates; SSM parameters and secrets; logs, alarms, Lambdas; IAM roles and policies; AMIs, ACM certs, Route 53 zones; and the CloudFormation stacks themselves.
Download
A single gzip-compressed binary (~5 MB). It’s also pre-installed on every gateway instance at /opt/cloudspectra/bin/cloudspectra_cleanup — if you can still reach an instance, that is the quickest route and needs no download at all.
Cloud Spectra software is served from a licence-gated store, so there is no direct download link. You fetch it with cloudspectra-get, a small public downloader that exchanges your licence key for a short-lived token and then pulls the artifact. Two steps:
1 — Get the downloader (public, no licence needed):
curl -fsSLO https://downloads.cloudspectra.ai/gateway/downloader/cloudspectra_gateway_downloader-linux-amd64 chmod +x cloudspectra_gateway_downloader-linux-amd64
2 — Use your licence key to fetch the cleanup tool:
# your CSTW1... licence key, the same one the gateway uses export CS_ARTIFACT_CREDENTIAL=CSTW1-your-licence-key ./cloudspectra_gateway_downloader-linux-amd64 \ -url https://dl.cloudspectra.ai/gateway/tools/latest/cloudspectra_cleanup-linux-amd64.gz \ -out cloudspectra_cleanup.gz gunzip cloudspectra_cleanup.gz chmod +x cloudspectra_cleanup
Swap the filename for your platform — the same six builds are published:
cloudspectra_cleanup-linux-amd64.gzcloudspectra_cleanup-linux-arm64.gzcloudspectra_cleanup-macos-amd64.gzcloudspectra_cleanup-macos-arm64.gzcloudspectra_cleanup-windows-amd64.exe.gzcloudspectra_cleanup-windows-arm64.exe.gzThe downloader is also how you fetch the gateway package, the clients and the Terraform provider — one tool, one licence, one store.
Usage
It uses the standard AWS credential chain (add --profile <name> to pick a profile). The deployment name is your CloudFormation stack name, or the name shown by --discover.
1 Find what's out there
List the Cloud Spectra deployments in your account and region.
./cloudspectra_cleanup --discover
2 Preview (safe, this is the default)
Show every resource that would be removed — nothing is deleted.
./cloudspectra_cleanup <deployment-name>
3 Remove it
Actually delete the resources. Prompts to confirm; add --yes to skip the prompt for scripts and CI.
./cloudspectra_cleanup <deployment-name> --force # non-interactive, across multiple regions, machine-readable output ./cloudspectra_cleanup <deployment-name> --force --yes \ --regions us-east-1,us-west-2 --json
terraform destroy / "Destroy" from the dashboard) — that path drains the deployment gracefully. Full reference lives in the User Guide.