Course contentsShow
← Cloud and Infrastructure
Lesson 669 of 2,98912. Monitoring FoundationsFree lesson

CloudWatch Metrics and Namespaces

Understanding CloudWatch standard and custom metrics, namespaces, dimensions, and metric resolution options.

CloudWatch Metrics and Namespaces

You'll learn: How CloudWatch organizes metrics using namespaces, dimensions, and resolution options to monitor AWS resources and custom applications.

What Are CloudWatch Metrics?

A metric in CloudWatch is a time-ordered set of data points—think of it as a variable being tracked over time (CPU usage, disk I/O, request count). CloudWatch collects these automatically for AWS services and lets you define custom ones for your applications.

Namespaces: Organizing Your Metrics

A namespace is like a container or folder that groups related metrics together. AWS services use namespaces like AWS/EC2, AWS/RDS, or AWS/Lambda to separate their metrics. When you create custom metrics, you define your own namespace (e.g., MyApp/Production) to avoid collision with AWS metrics.

Think of it this way: Namespaces are like filing cabinets—each drawer holds metrics for a specific service or application.

Dimensions: Adding Context

Dimensions are name-value pairs that identify unique metric streams within a namespace. For example, an EC2 metric might have dimensions like InstanceId=i-1234567 or InstanceType=t2.micro. Dimensions let you filter and aggregate metrics by specific characteristics.

Metric Resolution

CloudWatch supports two resolution types:

  • Standard resolution: Data stored at 1-minute granularity (free for most AWS services)
  • High resolution: Data stored down to 1-second intervals (useful for custom metrics needing finer detail, costs more)

Key Takeaway: CloudWatch uses namespaces to organize metrics by service, dimensions to add identifying attributes, and resolution options to control data granularity—giving you flexible, hierarchical monitoring across standard AWS services and custom applications.