An automated kill-switch for AWS accounts that prevents bill shock by cleaning up resources when spending limits are breached.
Features • Quick Start • Installation • Documentation • Contributing
Caution
CostCutter will delete AWS resources aggressively and indiscriminately once triggered. This is not a reversible operation. All data will be permanently lost.
CostCutter is a serverless AWS cost protection system that acts as an emergency brake for your cloud spending. It continuously monitors your AWS Budget and automatically triggers resource cleanup when costs exceed your predefined thresholds—ensuring you never wake up to a surprise $10,000 bill from a forgotten EC2 instance.
- 🎓 Students learning AWS who fear accidental charges
- 🧪 Experimenters testing AWS services without financial risk
- 🏖️ Sandbox environments that need automatic teardown
- 💡 Side projects with strict budget constraints
- 🚀 Hackathons where resources must be cleaned up after events
- 🏃 Dry Run Mode - Test what would be deleted without actually deleting anything
- 🎯 Multi-Region Support - Clean resources across all AWS regions or specific ones
- ⚙️ Flexible Configuration - YAML-based config with environment variable overrides
- 📊 Detailed Reporting - Live tables, summaries, and optional CSV exports
- 🔗 Dependency-Aware - Handles resource dependencies in the correct order
- 🐍 Type-Safe - Fully typed Python codebase with Pydantic validation
- 💻 CLI Mode - Run manually from your terminal
- ☁️ Lambda Mode - Deploy as serverless function triggered by AWS Budgets via SNS
Run CostCutter with uvx (no global install required):
# Run without installing (recommended)
uvx costcutter --version
# Safe dry run
uvx costcutter --dry-runFor full setup and configuration, see the documentation: https://costcutter.hyperoot.dev
# Dry run (safe mode - shows what would be deleted)
costcutter --dry-run
# Real execution (destructive!)
costcutter
# Use custom config
costcutter --config ./my-config.yamlCreate a costcutter.yaml:
aws:
region:
- us-east-1
- eu-west-1
services:
- ec2
- s3
- elasticbeanstalk
output:
log_level: INFO
report_format: csv
report_path: ./cleanup-report.csv- What is CostCutter?
- Getting Started Guide
- Configuration Reference
- Supported Services
- How It Works
- Terraform Integration
- Contributing Guide
We welcome contributions! CostCutter is intentionally modular to make adding new AWS services easy.
- Fork the repository
- Create a feature branch:
git checkout -b feat/add-rds-cleanup - Follow the coding standards (see
.github/copilot-instructions.md) - Add tests for your changes
- Submit a pull request
Check out our guides:
This project is licensed under the MIT License - see the LICENSE file for details.
USE AT YOUR OWN RISK.
CostCutter is a destructive tool designed to permanently delete AWS resources. The authors and contributors are not responsible for:
- Data loss
- Service interruptions
- Unintended deletions
- Financial consequences
- Any other damages resulting from the use of this tool
Always test in a safe environment first. Always use dry-run mode before actual execution. Always maintain proper backups.
Built with ❤️ by HYP3R00T
Powered by:
- boto3 - AWS SDK for Python
- Typer - CLI framework
- Rich - Beautiful terminal output
- Pydantic - Data validation
- UV - Fast Python package manager