CloudWatch Metrics Retention Periods
Amazon CloudWatch stores metrics at different resolutions for different durations. Understanding retention periods is important for alerting, dashboards, and cost planning.
CloudWatch metric retention by resolution
| Resolution | Retention period | Use case |
|---|---|---|
| < 60 seconds (high resolution) | 3 hours | Real-time alerting, burst detection |
| 1 minute | 15 days | Detailed short-term monitoring |
| 5 minutes | 63 days | Standard EC2/RDS monitoring |
| 1 hour | 445 days (15 months) | Trend analysis, capacity planning |
Key points
- High-resolution metrics (sub-minute) cost extra — enabled via the PutMetricData API with
StorageResolution=1. - Standard EC2 monitoring = 5-minute intervals (free). Detailed monitoring = 1-minute intervals (additional cost).
- CloudWatch automatically rolls up high-resolution data to lower resolutions as time passes — you don't lose data, just granularity.
- Custom metrics and log-derived metrics follow the same retention rules.
Retrieve metric data via CLI
aws cloudwatch get-metric-statistics \
--namespace AWS/EC2 \
--metric-name CPUUtilization \
--dimensions Name=InstanceId,Value=i-1234567890abcdef0 \
--start-time 2024-01-01T00:00:00Z \
--end-time 2024-01-02T00:00:00Z \
--period 3600 \
--statistics Average