How lamvl830/aws-cost-waste-detector works
AWS Cost Waste Detector is a self-hosted FinOps application that scans AWS resources, estimates avoidable costs, tracks findings over time, ranks opportunities, and produces private reports and alerts. Its principal scheduled workflow is EventBridge Scheduler → Lambda → regional resource scans and pricing → finding persistence, lifecycle reconciliation, and prioritization → notifications and HTML report publication. The README documents EC2 utilization analysis, multi-region scans, and deployment services; source excerpts and the SOURCE INDEX support the implementation links shown. Some service wiring is documented rather than directly excerpted.
Main entry points: detector.py Scan orchestrator · lambda_handler.py Lambda handler · ec2_idle.py Idle EC2 analysis · ebs.py Unattached EBS scan
Components 26
Scheduled workflow
- Lambda handler
src/aws_cost_waste_detector/lambda_handler.py - Scan orchestrator
src/aws_cost_waste_detector/detector.py
Detection and pricing
- Unattached EBS scan
src/aws_cost_waste_detector/scanners/ebs.py - Unused EIP scan
src/aws_cost_waste_detector/scanners/eip.py - Idle EC2 analysis
src/aws_cost_waste_detector/ec2_idle.py - EC2 discovery
src/aws_cost_waste_detector/ec2.py - Utilization metrics
src/aws_cost_waste_detector/cloudwatch_metrics.py - EBS pricing
src/aws_cost_waste_detector/pricing/ebs.py - Public IPv4 pricing
src/aws_cost_waste_detector/pricing/eip.py - EC2 pricing
src/aws_cost_waste_detector/ec2_pricing.py
Finding management
- Finding model
src/aws_cost_waste_detector/models.py - Lifecycle rules
src/aws_cost_waste_detector/lifecycle.py - Priority scoring
src/aws_cost_waste_detector/prioritization.py - Finding history
src/aws_cost_waste_detector/storage/dynamodb.py - Scan reconciliation
src/aws_cost_waste_detector/reconciliation.py
Reports and alerts
- Cost summary
src/aws_cost_waste_detector/reporting.py - HTML report
src/aws_cost_waste_detector/html_report.py - Report publisher
src/aws_cost_waste_detector/report_publisher.py - SNS notifier
src/aws_cost_waste_detector/notifier.py
Other components
- EventBridge Scheduler
- Amazon SNS
- Private S3 bucket
- AWS resources
- Amazon CloudWatch
- AWS Pricing API
- Report recipient
Connections 34
- EventBridge Scheduler → Lambda handler: invokes
README.md - Lambda handler → Scan orchestrator: runs scans
src/aws_cost_waste_detector/lambda_handler.py - Scan orchestrator → Unattached EBS scan: scans volumes
src/aws_cost_waste_detector/detector.py - Scan orchestrator → Unused EIP scan: scans addresses
src/aws_cost_waste_detector/detector.py - Scan orchestrator → Idle EC2 analysis: scans idle instances
src/aws_cost_waste_detector/detector.py - Unattached EBS scan → EBS pricing: gets storage price
src/aws_cost_waste_detector/scanners/ebs.py - Unused EIP scan → Public IPv4 pricing: gets address price
src/aws_cost_waste_detector/scanners/eip.py - Idle EC2 analysis → EC2 discovery: lists instances
src/aws_cost_waste_detector/ec2_idle.py - Idle EC2 analysis → Utilization metrics: reads utilization
src/aws_cost_waste_detector/ec2_idle.py - Idle EC2 analysis → EC2 pricing: estimates compute savings
src/aws_cost_waste_detector/ec2_idle.py - Unattached EBS scan → Finding model: creates findings
src/aws_cost_waste_detector/scanners/ebs.py - Unused EIP scan → Finding model: creates findings
src/aws_cost_waste_detector/scanners/eip.py - Idle EC2 analysis → Finding model: creates findings
src/aws_cost_waste_detector/ec2_idle.py - Scan orchestrator → Finding history: persists findings
src/aws_cost_waste_detector/detector.py - Scan orchestrator → Priority scoring: scores findings
src/aws_cost_waste_detector/detector.py - Finding history → Lifecycle rules: determines status
src/aws_cost_waste_detector/storage/dynamodb.py - Finding history → Priority scoring: calculates stored priority
src/aws_cost_waste_detector/storage/dynamodb.py - Scan orchestrator → Scan reconciliation: reconciles findings
src/aws_cost_waste_detector/detector.py - Scan orchestrator → Cost summary: builds summary
src/aws_cost_waste_detector/detector.py - Lambda handler → HTML report: renders report
src/aws_cost_waste_detector/lambda_handler.py - Lambda handler → Report publisher: publishes report
src/aws_cost_waste_detector/lambda_handler.py - Report publisher → Private S3 bucket: stores report
README.md - Scan orchestrator → SNS notifier: sends finding alerts
src/aws_cost_waste_detector/detector.py - Lambda handler → SNS notifier: sends report summary
src/aws_cost_waste_detector/lambda_handler.py - SNS notifier → Amazon SNS: publishes messages
src/aws_cost_waste_detector/notifier.py - Amazon SNS → Report recipient: delivers alerts
README.md - AWS resources → Unattached EBS scan: provides volume data
README.md - AWS resources → Unused EIP scan: provides address data
README.md - AWS resources → EC2 discovery: provides instances
README.md - Utilization metrics → Amazon CloudWatch: queries metrics
README.md - EBS pricing → AWS Pricing API: queries prices
src/aws_cost_waste_detector/pricing/ebs.py - Public IPv4 pricing → AWS Pricing API: queries prices
src/aws_cost_waste_detector/pricing/eip.py - EC2 pricing → AWS Pricing API: queries prices
README.md - Private S3 bucket → Report recipient: serves temporary link
README.md