Overview
fjall destroy <app> deletes the AWS resources for one application, in reverse dependency order.
The positional argument is application-only. Tier teardown uses noun-verb commands instead: fjall org destroy, fjall platform destroy, fjall account destroy.
Passing organisation, platform, account or domain as the positional fails before authentication with a teaching error naming the right spelling. Nothing is validated and nothing is destroyed:
Prerequisites
Without the infrastructure file,
destroy stops with No infrastructure.ts found and does no AWS work.
Usage
Destroy an application
Compute goes before the database, and the network stack goes last, so nothing is deleted while a dependent stack still references it.
What survives the destroy
Removal policies come from the target account’s environment, not from a flag on the command. Accounts stampedproduction default to RETAIN, so their data resources outlive the stack delete. Every other stage (staging, development, platform, compliance) defaults to DESTROY.
Check which account a target maps to with fjall target list before you destroy anything in a staging or development account.
Tear down tier infrastructure
Tier teardown is noun-verb. Each command registers only the flags its tier honours.Cascade control
fjall org destroy cascades by default, tearing down every member account first, then the platform, then the organisation stack:
--no-cascade to destroy the organisation stack alone:
Interactive flow
Runfjall destroy with no argument for a guided teardown:
No organisation infrastructure found. / Nothing to destroy. and exits.
Selecting Organisation then asks about the cascade, defaulting to No:
The pickers appear only when you run
fjall destroy bare. Passing a target (fjall destroy api, fjall org destroy) jumps straight to the confirmation, so on fjall org destroy the cascade is controlled by --no-cascade rather than by the prompt.Confirmation
The final gate is a typed confirmation, not a yes/no prompt. Type the target name exactly (case-insensitive) to proceed:--force or --skip-confirmation replaces the typed gate with a skipped step:
destroy exits with a validation error:
Arguments
Options
--target selects which account and region the credentials come from. The positional argument stays the application name.
Agent options
For AI-agent and scripted use,destroy also accepts the standard agent flags:
Without
--force or --skip-confirmation, agent mode returns a structured destructive-confirmation gate naming the exact command to re-run.
Tier destroy options
fjall org destroy, fjall platform destroy and fjall account destroy take -f, --force, --skip-confirmation and --target <target>, plus the standard and agent flags above. --no-cascade is available on fjall org destroy only.
--target is refused on fjall org destroy, because organisation infrastructure always deploys to the management account:
Aliases
destroy has one alias, delete:
Examples
Common issues
Stack stuck in DELETE_FAILED
CloudFormation reports the resource blocking the delete. Open the stack’s Events tab in the CloudFormation console, clear the blocker, then run the samefjall destroy command again.
S3 bucket not empty
Fjall empties buckets tagged for auto-delete before deleting the stack. Buckets without that tag are left in place and can block the delete. Empty them, then re-run the destroy.RDS deletion protection enabled
Deletion protection blocks the stack delete while it is on. Disable it in the RDS console, then re-run the destroy.Retry, then fall back
- Read the CloudFormation events for the failed stack.
- Clear the blocker (empty the bucket, disable the protection).
- Re-run the same
fjall destroycommand. Destroy is re-runnable and skips stacks that are already gone. - Delete the remaining stack from the AWS Console as a last resort.
Before you destroy
- Snapshot the database. RDS and Aurora take a final snapshot on delete, and production instances retain their automated snapshots. Confirm the snapshot exists in the RDS console before you start.
- Copy bucket contents you need. Anything in a bucket tagged for auto-delete goes with the stack.
- Export the logs you want to keep. CloudWatch log groups are deleted with their stack.
- Check what the application declares. Run
fjall list -a apito see every resource in the application’sinfrastructure.ts. - Rehearse in a non-production account first.
CloudFormation stacks can take 5-10 minutes to delete. A cascading
fjall org destroy across several member accounts takes considerably longer.Next Steps
fjall deploy
Redeploy an application or tier infrastructure.
fjall remove
Remove one resource from infrastructure.ts without touching AWS.
fjall list
Inspect the resources an application declares.
fjall restore
Restore data from a snapshot after teardown.