Operations · Disaster Recovery

Cloud Spectra cleanup tool

A free, standalone, last-resort tool that fully removes a Cloud Spectra deployment's AWS resources when a normal teardown aborts, fails, or gets stuck — so you're never left paying for orphaned infrastructure.

Download See usage

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 — run it there over SSH.

Or install from your terminal (Linux x86-64):

# download, decompress, and make executable
curl -fsSL https://cloudspectra-software-releases-hfmbl6xjawy7i.s3.us-east-1.amazonaws.com/cleanup-tool/latest/cloudspectra_cleanup-linux-amd64.gz \
  | gunzip > cloudspectra_cleanup
chmod +x cloudspectra_cleanup

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
Reminder. This is a recovery tool for a failed or stuck teardown. For normal decommissioning, delete the CloudFormation stack (or run terraform destroy / "Destroy" from the dashboard) — that path drains the deployment gracefully. Full reference lives in the User Guide.