Cloud Cost Optimization Toolkit
Scripts and dashboards for identifying waste, right-sizing instances, reserved capacity planning, and budget alerts.
📄 Product Preview
Try the interactive reader and demo tools below, or get the full product with all content unlocked.
📖 Interactive Reader (Free Preview) ⚙ Try Demo Tools 📦 Download Free Sample📁 File Structure 23 files
📖 Documentation Preview README excerpt
Cloud Cost Optimization Toolkit
Identify waste, right-size instances, plan reserved capacity, and set budget alerts across AWS and Azure.
A battle-tested collection of Terraform/CloudFormation IaC templates, Python analysis scripts, and operational runbooks for cloud cost engineering. Built for FinOps practitioners and senior cloud engineers who need to cut spend without cutting performance.
What's Included
| Category | Files | Description |
|---|---|---|
| Terraform | budget_alerts.tf, cost_anomaly_detection.tf, s3_lifecycle_policies.tf, variables.tf | Deploy budget alarms, anomaly detection, and storage lifecycle policies |
| CloudFormation | budget-alerts-stack.yaml, cost-explorer-reports.yaml | AWS-native stacks for budget monitoring and scheduled Cost Explorer reports |
| Scripts | rightsizing_report.py, unused_resources_finder.py, reserved_capacity_planner.py, cost_dashboard_generator.py | Python stdlib-only analysis tools for cost optimization |
| Docs | architecture.md, cost_strategies.md, runbook.md | Reference architecture, 30+ optimization strategies, and operational runbook |
| Examples | budget_config.json, rightsizing_rules.yaml | Ready-to-use configuration files for the toolkit |
Architecture Summary
+------------------+ +-----------------+ +------------------+
| Cost Explorer |---->| Analysis |---->| Action Layer |
| & Billing APIs | | Scripts | | |
+------------------+ +-----------------+ +------------------+
| | |
v v v
Raw spend data Rightsizing recs Budget alerts
Usage reports Unused resources Auto-remediation
RI/SP coverage Capacity planning Slack/email notify
The toolkit operates in three layers:
1. Data Collection -- Pulls billing, usage, and reservation data via AWS/Azure APIs
2. Analysis -- Python scripts process the data to find savings opportunities
3. Action -- Terraform/CFn deploys alerts, policies, and automated remediation
Prerequisites
- AWS CLI configured with credentials (
aws configure) - Terraform >= 1.5.0 (for IaC templates)
- Python >= 3.10 (for analysis scripts -- stdlib only, no pip packages)
- IAM permissions:
ce:,budgets:,ec2:Describe,rds:Describe,s3:Get*,cloudwatch:PutMetricAlarm
Quick Start
1. Deploy Budget Alerts (Terraform)
cd terraform/
# Review and customize variables
cp terraform.tfvars.example terraform.tfvars
vim terraform.tfvars
terraform init
terraform plan
terraform apply
2. Deploy Budget Alerts (CloudFormation)
... continues with setup instructions, usage examples, and more.