AWS CloudWatch

Anatomy of Alarms

Metric Granularity and Aggregation

In this guide, we’ll dive into how AWS CloudWatch captures and processes metrics from services like Amazon RDS. You’ll learn how metric granularity influences data resolution and how aggregation turns raw data into actionable insights for monitoring, alerting, and capacity planning.

Table of Contents

Metric Granularity

Metric granularity determines how often CloudWatch collects and stores data points—similar to adjusting a camera’s resolution. Fine-grained data offers deeper insights into system behavior.

The image illustrates the concept of metric granularity in Amazon CloudWatch, showing how data is collected and stored from AWS RDS within a Virtual Private Cloud (VPC) in an availability zone.

By default, most AWS services emit metrics at 1-minute intervals. However, Amazon RDS basic monitoring only reports every 5 minutes unless you enable detailed monitoring for 1-minute resolution.

ServiceDefault GranularityDetailed MonitoringTypical Use Case
Amazon RDS5 minutes1 minuteDeep database performance troubleshooting
Amazon EC25 minutes1 minuteHigh-frequency CPU/memory analysis
ELB / ALB1 minuteReal-time traffic and latency metrics

Note

For mission-critical workloads, enabling detailed monitoring provides the visibility needed to detect spikes and performance bottlenecks.

Why Granularity Matters

  • Responsive Alarms: Trigger alerts at precise thresholds.
  • Detailed Dashboards: Visualize fine spikes in CPU, memory, or I/O.
  • Performance Tuning: Correlate rapid metric changes with application events.

Metric Aggregation

Aggregation in CloudWatch summarizes multiple data points into a single metric value by applying statistical functions. This process helps identify trends and anomalies over time.

The image illustrates a process of metric aggregation within an AWS cloud environment, showing data flow from a Virtual Private Cloud (VPC) and AWS RDS to a metric aggregation component.

Common aggregation functions:

StatisticDescription
AverageMean value of all points in the period
SumTotal of all values
MinimumLowest data point
MaximumHighest data point

Use Cases for Aggregation

  • Retrospective Analysis: Understand resource usage over days or weeks.
  • Predictive Scaling: Forecast demand to automate scaling policies.
  • Smart Alarms: Set thresholds on aggregated values (e.g., 5-minute average CPU).

Warning

Aggregation over coarse time intervals can mask short-lived spikes. Always align your aggregation period with your alerting requirements.

Best Practices

  • Enable 1-minute granularity for critical services (RDS, EC2).
  • Choose appropriate aggregation periods to balance data volume and insight.
  • Leverage Composite Alarms to combine multiple aggregated metrics.
  • Use Metric Math for custom calculations and anomaly detection.

Build a robust monitoring strategy by combining the right granularity with effective aggregation—ensuring you never miss critical performance signals.

Watch Video

Watch video content

Previous
Built in and Custom Metrics