How ayushraghuwanshi1704/aws-finops-cost-optimizer works
AWS FinOps Cost Optimizer provides read-only cost and resource analysis, a local dashboard for reviewing findings, and guarded scheduled remediation deployed with Terraform. The main workflow is an engineer running an analysis or opening the dashboard, gathering AWS or demo data, calculating costs/findings, and exporting or reviewing results. Separate automation handles tagging, scheduling, and snapshot retention. Edges follow README statements and shown imports/calls; some deployment wiring is documented rather than visible in sampled Terraform source.
Main entry points: data.py Payload provider · app.py Dashboard server · unused_resources.py Waste detection · rightsizing_recommendations.py Rightsizing
Components 24
Read-only analysis
- Cost reports
scripts/cost_analysis.py - Waste detection
scripts/unused_resources.py - Rightsizing
scripts/rightsizing_recommendations.py - Commitment analysis
scripts/commitment_coverage.py
Local dashboard
- Dashboard server
web/app.py - Payload provider
web/data.py - Demo data
web/demo_data.py - Live cost queries
web/live.py - EBS status
web/ebs.py - Report downloads
web/reports.py - Dashboard UI
web/static/app.js
Scheduled automation
- Auto-tagger
lambda/auto_tagger/main.py - Instance scheduler
lambda/scheduler/main.py - Snapshot cleanup
lambda/snapshot_cleanup/main.py
AWS deployment
- Infrastructure deployment
terraform/main.tf - Lambda resources
terraform/modules/lambda/main.tf - Cost dashboard config
dashboards/cost_overview_dashboard.json
External services
- Cost Explorer
- CloudWatch
- EC2 and RDS APIs
- EventBridge
- SNS notifications
- Budgets and anomalies
Other components
- Engineer
Connections 37
- Engineer → Cost reports: runs analysis
README.md - Engineer → Waste detection: runs analysis
README.md - Engineer → Rightsizing: runs analysis
README.md - Engineer → Commitment analysis: runs analysis
README.md - Cost reports → Cost Explorer: queries costs
README.md - Commitment analysis → Cost Explorer: queries coverage
README.md - Waste detection → CloudWatch: reads metrics
README.md - Waste detection → EC2 and RDS APIs: describes resources
README.md - Rightsizing → CloudWatch: reads utilization
README.md - Rightsizing → EC2 and RDS APIs: describes instances
README.md - Engineer → Dashboard server: opens dashboard
README.md - Dashboard server → Payload provider: builds payload
web/app.py - Payload provider → Demo data: loads sample data
web/data.py - Payload provider → Live cost queries: queries live data
web/data.py - Payload provider → EBS status: loads EBS status
web/data.py - Payload provider → Cost reports: uses analysis
web/data.py - Payload provider → Waste detection: uses analysis
web/data.py - Payload provider → Rightsizing: uses analysis
web/data.py - Payload provider → Commitment analysis: uses analysis
web/data.py - Dashboard server → Report downloads: formats downloads
web/app.py - Dashboard server → EBS status: serves EBS route
web/app.py - Live cost queries → Cost Explorer: queries costs
README.md - EBS status → EC2 and RDS APIs: describes volumes
web/ebs.py - Dashboard UI → Dashboard server: requests dashboard
- Engineer → Infrastructure deployment: deploys toolkit
README.md - Infrastructure deployment → Lambda resources: configures functions
- Infrastructure deployment → Cost dashboard config: deploys monitoring
- EventBridge → Auto-tagger: schedules hourly
README.md - EventBridge → Instance scheduler: schedules stop start
README.md - EventBridge → Snapshot cleanup: schedules daily
README.md - Auto-tagger → EC2 and RDS APIs: updates tags
README.md - Instance scheduler → EC2 and RDS APIs: starts and stops
README.md - Snapshot cleanup → EC2 and RDS APIs: cleans snapshots
README.md - Auto-tagger → SNS notifications: notifies
README.md - Instance scheduler → SNS notifications: notifies
README.md - Snapshot cleanup → SNS notifications: notifies
README.md - Budgets and anomalies → SNS notifications: sends alerts
README.md