All projects

Infrastructure

cfn-cleanup

CLI tool for finding and cleaning up stale AWS CloudFormation stacks matching a prefix. Safe dry-run mode, age-based filtering, protection tags, and parallel deletion with configurable concurrency.

View the source Go / AWS CloudFormation / AWS SDK

If you’ve ever managed ephemeral CloudFormation stacks — feature branch deployments, PR previews, dev environments — you know the cleanup problem. Stacks accumulate, costs creep up, and nobody wants to manually delete them.

cfn-cleanup finds stacks matching a prefix, filters by age, respects protection tags, and deletes them in parallel with configurable concurrency. Dry-run mode shows exactly what would be deleted before you commit. A --force flag makes it CI/CD-friendly for automated cleanup pipelines.

It’s a small, focused tool that does one thing well. Written in Go for fast execution and zero runtime dependencies.