AI-powered AWS cost monitoring with Slack alerts
Detect spending anomalies, track budgets, and get intelligent analysis delivered directly to Slack.
- Anomaly Detection - AI-powered identification of unusual spending patterns
- Daily & Weekly Reports - Automated summaries with budget tracking and forecasts
- Interactive Slack Alerts - Acknowledge costs as expected/unexpected directly from Slack
- Budget Threshold Alerts - Warnings at 80% and critical alerts at 100% of budget
- AI Analysis - Claude or GPT explains what's driving cost changes
- @mention Bot - Ask questions like
@guardian what did we spend yesterday?
# Clone and setup
git clone https://github.com/your-org/slack-aws-cost-guardian.git
cd slack-aws-cost-guardian
make setup
# Configure (edit .env with your Slack webhooks and API keys)
vim .env
# Deploy
source .venv/bin/activate
make deploy
# Verify
make validateFull setup guide: docs/SETUP.md - includes Slack App configuration, bot setup, and troubleshooting.
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ EventBridge │────▶│ Lambda │────▶│ Cost Explorer │
│ (scheduled) │ │ (collector) │ │ API │
└─────────────────┘ └────────┬────────┘ └─────────────────┘
│
▼
┌─────────────────┐
│ DynamoDB │
│ (snapshots) │
└────────┬────────┘
│
┌────────────┴────────────┐
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ Anomaly Detect │ │ LLM Analysis │
└────────┬────────┘ └────────┬────────┘
│ │
└────────────┬────────────┘
▼
┌─────────────────┐
│ Slack Alert │◀───── User Feedback
│ (with buttons) │
└─────────────────┘
┌─────────────────┐ ┌─────────────────┐
│ Slack @mention │────▶│ Events Lambda │────▶ Bot Response
│ or DM │ │ (with tools) │
└─────────────────┘ └─────────────────┘
This tool costs approximately $2-8/month depending on your settings:
| Component | Cost | Notes |
|---|---|---|
| Cost Explorer API | ~$1.50-6/month | Depends on collection frequency |
| Secrets Manager | ~$0.40/month | Per secret |
| DynamoDB | ~$0.05/month | On-demand, minimal storage |
| Lambda/S3 | ~$0/month | Free tier covers it |
| LLM API (optional) | ~$0.30-1.00/month | For AI insights |
See config/config.example.yaml for detailed cost breakdown and optimization tips.
Copy and customize the config file:
cp config/config.example.yaml config/config.yamlKey settings:
- Collection frequency - How often to fetch costs (daily recommended)
- Budget thresholds - When to alert (80%, 100%)
- Anomaly sensitivity - What triggers an alert ($10 change, 50% increase)
Customize the AI's understanding of your infrastructure:
vim config/guardian-context.md
make update-context- Setup Guide - Complete installation and configuration
- Architecture - Technical reference and data models
- Backlog - Roadmap and planned features
make help # Show all commands
make deploy # Deploy to AWS
make validate # Verify configuration
make test-daily # Send daily report
make logs # Tail collector logs
make logs-events # Tail bot logsMIT License - see LICENSE for details.
