How to Set Up AWS Cost Anomaly Detection
AWS Cost Anomaly Detection flags unusual spending. Here's how to set it up—monitors, alerts, and root cause analysis.
What this problem means
AWS Cost Anomaly Detection uses machine learning to detect unusual spending patterns. When your bill spikes in a way that doesn't match your baseline, it alerts you. It's a complement to AWS Budgets—Budgets alert on thresholds, Anomaly Detection alerts on unexpected patterns.
Why this matters
- Early warning: Catches unusual spending before the invoice arrives.
- Root cause: Links anomalies to specific services, accounts, or cost categories.
- No manual thresholds: ML learns your baseline. You don't set dollar amounts.
Real-world example
A startup had AWS Budgets at 50%, 80%, and 100%. But their bill spiked 20% in a weird way—one service, one region. Budgets didn't fire (they were under 50%). Cost Anomaly Detection flagged it. They found a misconfigured Lambda and fixed it before it got worse.
How to fix it
1. Enable Cost Anomaly Detection: In AWS Cost Management, go to Cost Anomaly Detection.
2. Create a monitor: Choose what to monitor—all costs, or by account, service, or tag.
3. Set up alerts: Choose SNS topic for alerts. Confirm the email subscription.
4. Configure sensitivity: Higher sensitivity = more alerts, maybe more false positives. Start with default.
5. Review: Check the dashboard weekly. Anomalies show root cause (service, region, etc.).
Tools and configurations
- AWS Cost Anomaly Detection: In Billing & Cost Management.
- Monitors: All costs, or by account, service, or tag.
- Alerts: SNS topic. Email, Slack, or PagerDuty.
- Root cause: Anomaly dashboard shows which service/region caused the spike.
Common mistakes
- Not confirming SNS email subscription.
- Ignoring alerts ("probably fine").
- Only using Budgets (Anomaly Detection catches different patterns).
Quick checklist
- [ ] Enable Cost Anomaly Detection
- [ ] Create monitor (all costs or by service)
- [ ] Set up SNS alerts and confirm email
- [ ] Review anomaly dashboard weekly
- [ ] Use with AWS Budgets (both, not either/or)
Need help with production readiness? Get a free 30-minute audit.
Book Free 30-Min Production AuditCheck if your system has this risk
Take the 60-second production readiness assessment to identify gaps in your infrastructure.
Start AssessmentRelated guides
Frequently asked questions
- How do I set up AWS Cost Anomaly Detection?
- Go to Billing & Cost Management > Cost Anomaly Detection. Create a monitor (all costs or by service). Set up SNS alerts. Confirm the email subscription.
- What is the difference between AWS Budgets and Cost Anomaly Detection?
- Budgets alert on thresholds (e.g., 80% of expected spend). Anomaly Detection catches unusual patterns—e.g., one service spiking. Use both.
- Does Cost Anomaly Detection cost money?
- Cost Anomaly Detection is free. You pay for the underlying Cost Explorer data (if not already enabled).