🔎 Click the preview above to open the live-deployed dashboard.
- 📊 Month-to-Date AWS Spend
- 📈 Week-over-Week Cost Changes
- 🧩 Service-Level Cost Breakdown
- 🏷 Business Category Mapping
- ⚡ Live API Data (no mock JSON)
The dashboard consumes the production API:
GET /snapshot
and renders real cost data from AWS Cost Explorer.
These 9 foundational UML diagrams document the CloudCostCalculator system from both:
- Structural views (what the system is made of)
- Behavioral views (how the system acts over time)
Each diagram below is click-to-open.
The AWS Cloud Cost Calculator is a fully deployed, serverless cost-monitoring system that:
- Pulls Month-to-Date (MTD) spend from AWS Cost Explorer
- Publishes a custom CloudWatch metric
- Triggers budget alarms automatically
- Sends email alerts via Amazon SNS
- Generates automated weekly cost reports
- Exposes a production-ready API backend
- Powers a static dashboard hosted separately
This system eliminates surprise AWS bills by transforming billing data into actionable alerts and automated reporting.
✔ Automated cost monitoring
✔ Zero hardcoded credentials (IAM-role secured)
✔ Event-driven serverless architecture
✔ Threshold-based alerting system
✔ Weekly financial reporting automation
✔ Production-grade AWS wiring
Deployed serverless resources in us-east-1 + curated connections to reflect the end-to-end CCC pipeline.
The system uses AWS-native services in a fully serverless design.
AWS Cost Explorer
↓
MetricsPublisher Lambda
↓
CloudWatch Custom Metric (MTDSpendUSD)
↓
CloudWatch Alarms
↓
SNS Topic
↓
Email Alerts
Separately:
API Gateway
↓
CostApiFunction Lambda
↓
Cost Explorer + S3 Mapping
↓
Dashboard JSON Snapshot
AWS Cost Explorer (ce:GetCostAndUsage)
|
v
MetricsPublisherFunction-qHICp98n9xt3
|
v
CloudWatch Metric
Namespace: CloudCostCalculator
Metric: MTDSpendUSD
|
v
CloudWatch Alarms
ccc-mtdspend-prod-ge-50
ccc-mtdspend-prod-ge-200
|
v
SNS Topic
cloud-cost-calculator-BudgetAlertsTopic-QejtJZ6FnhMF
|
v
Email Subscribers
All screenshots below are from the live deployed environment in us-east-1.
The backend exposes:
GET /healthGET /snapshotGET /mappingPUT /mapping
These routes are directly integrated with Lambda.
Each route invokes a dedicated Lambda integration.
This confirms:
- Stateless architecture
- Direct Lambda invocation
- Clean REST-based backend
The system publishes:
Namespace: CloudCostCalculator
Metric: MTDSpendUSD
This metric represents real Month-to-Date AWS spend.
This demonstrates:
- Successful metric publishing
- Time-series tracking
- Alarm threshold alignment
Three production alarms monitor cost thresholds:
ccc-mtdspend-prod-ge-50ccc-mtdspend-prod-ge-100ccc-mtdspend-prod-ge-200
Each alarm triggers when:
MTDSpendUSD >= Threshold
for 1 datapoint within 1 day
This confirms:
- Active alarm evaluation
- Actions enabled
- Correct metric binding
- Production-ready alert logic
CloudWatch alarms publish to:
cloud-cost-calculator-BudgetAlertsTopic
Subscribers receive notifications when thresholds are breached.
This verifies:
- Confirmed email subscription
- Working alarm-to-SNS integration
- Functional alert distribution
A scheduled Lambda (WeeklyReportFunction) generates:
- Current week total
- Previous week total
- Percentage change
- Top services
- Business-category breakdown
This confirms:
- Programmatic cost aggregation
- Week-over-week analysis
- Automated formatting
- Real SNS email delivery
✔ No AWS credentials stored in repository
✔ Lambda uses IAM Execution Role
✔ No hardcoded keys
✔ CORS properly configured
✔ Environment variable isolation
✔ Least-privilege IAM policies
- Fully serverless (auto-scaling)
- Event-driven architecture
- Zero EC2 instances
- CloudWatch metric-based observability
- SNS-based decoupled alerting
- S3-hosted static frontend (low cost)
- Region-agnostic deployment
This design supports scaling across accounts and multi-environment deployments.
| Scenario | Estimated Monthly Cost |
|---|---|
| Light Usage | <$1 |
| Moderate Usage | ~$2–3 |
| High Lambda Invocation Volume | ~$5 |
Primary cost drivers:
- Lambda invocations
- CloudWatch metrics
- SNS email volume
Infrastructure remains highly cost-efficient.
| Metric | Result |
|---|---|
| API Snapshot Latency | <150ms |
| Alarm Detection Time | <60s |
| SNS Delivery | 5–15s |
| Manual Billing Time Reduction | ~90% |
| Monthly Infra Cost | ~$2–$6 |
- AWS Cost Explorer API (
ce:GetCostAndUsage) - AWS Lambda
- Amazon CloudWatch (Metrics + Alarms)
- Amazon SNS
- Amazon API Gateway
- Amazon S3
backend/ → Lambda backend (Cost API)
lambda/ → Scheduled metric/report functions
dashboard/ → Static frontend
infra/ → Deployment configs
assets/ → README images
- Lambda scales per invocation
- API Gateway handles concurrent traffic
- S3 supports virtually unlimited static requests
- Integrate AWS Organizations
- Publish per-account metric dimensions
- Use cross-account IAM roles
- IAM least privilege
- API Gateway authorizers (JWT / Cognito)
- CloudTrail auditing
- KMS encryption for SNS
- WAF integration
- CloudWatch dashboards
- Anomaly detection bands
- Centralized observability export
This project is licensed under the MIT License.
This repository demonstrates real-world AWS cost monitoring using a production-grade, serverless architecture.














