How agussman/aws-cost-explorer works
This is a small AWS Lambda billing-report script. Its workflow selects the previous calendar month, queries Cost Explorer for monthly blended costs grouped by the Project tag, formats the results as TSV (placing untagged costs under Other), and emails the attachment through SES. The runtime is concentrated in one file; the README additionally documents scheduled invocation and required AWS permissions. Edges reflect the excerpted calls and README statements.
Main entry points: generate_report.py Report handler
Components 8
Billing reporting
- Report handler
generate_report.py - Month selection
generate_report.py - TSV formatting
generate_report.py - Email composition
generate_report.py
AWS services
- Cost Explorer
- Simple Email Service
Other components
- Scheduled Lambda
- Finance recipient
Connections 7
- Scheduled Lambda → Report handler: invokes
README.md - Report handler → Month selection: selects month
generate_report.py - Report handler → Cost Explorer: queries costs
generate_report.py - Report handler → TSV formatting: formats results
generate_report.py - Report handler → Email composition: sends report
generate_report.py - Email composition → Simple Email Service: sends raw email
generate_report.py - Simple Email Service → Finance recipient: delivers email