Teardown
Teardown permanently destroys your entire AlphaAgent Studio deployment — including all of your data — in a single command, returning the AWS account to a clean slate. This is the deliberate counterpart to install: it is for decommissioning a deployment or starting over from scratch, and it is irreversible.
⚠️ Teardown deletes your data. There is no undo. It empties and deletes your S3 buckets, deletes all DynamoDB tables, removes your ECR images, force-deletes your secrets (with no recovery window), and deletes the self-hosted Neo4j graph volume. Back up anything you need before you run it.
Running teardown
python3 studioctl.py teardown
Because this action is destructive and irreversible, studioctl puts several safety gates in front of it:
- It prints a loud warning that lists exactly what will be deleted and what will be preserved, with a reminder to back up your data.
- You must type, in turn, your AWS account ID, then your region, then the word
DESTROY— three separate confirmations, so it cannot be triggered by a stray keypress. - It then shows a 30-second countdown. Press Ctrl-C any time during the countdown to abort cleanly — nothing has been deleted yet.
To preview exactly what would be deleted without changing anything, run:
python3 studioctl.py teardown --dry-run
Non-interactive teardown
For automation, a bare --yes is deliberately refused for teardown. You must explicitly add a second flag to confirm you understand the consequences:
python3 studioctl.py teardown --yes --i-understand-this-deletes-everything
If you want to keep the VPC and networking in place (for example, you manage it separately), add --no-purge-network.
What is deleted vs. preserved
Deleted (everything in the deployment region)
Teardown removes the complete deployment and all of its data in the region you deployed to:
- All application data — DynamoDB tables (agents, conversations, datasets, operational data), S3 buckets and their entire contents (workspaces, uploaded documents, the web app, artifacts), and the ElastiCache (Redis) cache.
- All container images — your ECR repositories and the Studio images in them.
- All secrets — the activated license secret, Neo4j credentials, and connector credentials are force-deleted with no recovery window.
- Neo4j data — the self-hosted encrypted graph volume (EFS) is deleted.
- Compute and runtime resources — the ECS services and cluster, the load balancer, the per-agent execution environments, the Cognito user pool (and its users), log groups, and configuration parameters.
- Networking — the VPC, NAT gateways, subnets, and security groups the installer created (unless you pass
--no-purge-network).
Preserved (so a fresh install still works)
Teardown only removes what the installer created in the deployment region. A couple of things are deliberately left in place:
- TLS certificate (ACM) — your certificate is never touched, so you can redeploy without re-issuing it.
- Anything outside the deployment region. Teardown is strictly scoped to the region you deployed to; resources in other regions (including same-named S3 buckets) are left alone.
Resilience
Teardown is idempotent and safe to re-run. Some AWS resources (network interfaces, NAT gateways) can take several minutes to fully release, which can leave a few items behind on the first pass. Every step tolerates already-deleted resources, so if teardown is interrupted — or if it reports a handful of leftovers in its final inventory — simply run it again to finish the job. The final inventory at the end of the run lists anything still present.
Redeploying after teardown
A full teardown returns the region to a clean slate, so a subsequent deploy is a brand-new install, not a resume:
- You will re-activate your license from the Console using your License Token, because the activated license secret was deleted.
- There is no data to collide with, so the preflight check in the deploy walkthrough starts clean.
- Self-hosted Neo4j starts with an empty graph.
If your goal is simply to move to a new release without losing data, do not use teardown — use Updating Studio instead.