
1️⃣ What are Amazon CloudWatch Metrics?
-
Amazon CloudWatch Metrics are time-ordered sets of data points that represent the performance of AWS resources and applications.
- Each metric has:
-
Namespace (e.g.,
AWS/EC2
)
-
Metric Name (e.g.,
CPUUtilization
)
-
Dimensions (e.g.,
InstanceId=i-12345
)
- Timestamps
-
Unit of measure (e.g., percent, bytes, seconds)
2️⃣ Key Features
- Metrics are collected automatically for many AWS services.
- Metrics are stored for 15 months for historical analysis.
- You can publish custom metrics from your applications or on-premises systems.
- Supports standard resolution (1-minute) and high-resolution (1-second) metrics.
3️⃣ Common AWS Service Metrics
Service |
Metric Examples |
EC2 |
CPUUtilization, NetworkIn, DiskReadOps |
S3 |
BucketSizeBytes, NumberOfObjects |
RDS |
DatabaseConnections, ReadIOPS |
Lambda |
Invocations, Duration, Errors |
DynamoDB |
ReadThrottleEvents, WriteCapacityUtilization |
4️⃣ CloudWatch Custom Metrics
You can create your own metrics using:
aws cloudwatch put-metric-data \
--namespace "MyAppNamespace" \
--metric-name "PageLoadTime" \
--value 2.5 \
--unit Seconds
Example use case: Track application latency or business KPIs like "OrdersPlaced".
5️⃣ Metric Granularity & Retention
Resolution Type |
Data Storage Duration |
1-second (High-Res) |
3 hours |
1-minute (Standard) |
15 days |
5-minute average |
63 days |
1-hour average |
15 months |
6️⃣ How Metrics Work in Monitoring
- AWS services send metrics to CloudWatch.
- CloudWatch stores them in a namespace.
- You can:
-
Create alarms to trigger notifications or actions (e.g., Auto Scaling).
-
Visualize metrics using CloudWatch Dashboards.
-
Set anomaly detection to identify unusual patterns.
✅ In Short:
-
CloudWatch Metrics = Key performance indicators for AWS resources and custom apps, stored over time, used for monitoring, dashboards, and automated scaling actions.
✅ AWS CloudWatch Metrics Cheatsheet
CloudWatch Metrics are time-series data points that help monitor AWS resources and applications, visualize performance, set alarms, and automate scaling.
1️⃣ EC2 (Amazon Elastic Compute Cloud)
Metric Name |
Unit |
Description |
CPUUtilization |
Percent (%) |
CPU usage across all cores |
NetworkIn |
Bytes |
Amount of incoming traffic |
NetworkOut |
Bytes |
Amount of outgoing traffic |
DiskReadOps |
Count |
Number of read operations on instance store |
DiskWriteOps |
Count |
Number of write operations on instance store |
StatusCheckFailed |
Count (0/1) |
Instance or system reachability check failures |
2️⃣ Lambda (AWS Lambda Functions)
Metric Name |
Unit |
Description |
Invocations |
Count |
Number of times the function is executed |
Duration |
Milliseconds |
Execution time of the function |
Errors |
Count |
Number of failed function executions |
Throttles |
Count |
Number of invocation requests throttled |
IteratorAge |
Milliseconds |
Age of the last record processed for stream-based invocations |
ConcurrentExecutions |
Count |
Number of functions running at the same time |
3️⃣ S3 (Amazon Simple Storage Service)
Metric Name |
Unit |
Description |
BucketSizeBytes |
Bytes |
Total storage size of objects in a bucket |
NumberOfObjects |
Count |
Number of stored objects |
AllRequests |
Count |
Number of requests to S3 bucket |
4xxErrors |
Count |
Number of client errors |
5xxErrors |
Count |
Number of server errors |
FirstByteLatency |
Milliseconds |
Time taken from request to first byte returned |
4️⃣ RDS (Amazon Relational Database Service)
Metric Name |
Unit |
Description |
CPUUtilization |
Percent (%) |
CPU usage of DB instance |
DatabaseConnections |
Count |
Number of active DB connections |
ReadIOPS |
Count/sec |
Read operations per second |
WriteIOPS |
Count/sec |
Write operations per second |
FreeStorageSpace |
Bytes |
Remaining available storage |
ReplicaLag |
Seconds |
Replication delay in a read replica |
5️⃣ DynamoDB (Amazon DynamoDB Table)
Metric Name |
Unit |
Description |
ConsumedReadCapacityUnits |
Count/sec |
Read capacity used |
ConsumedWriteCapacityUnits |
Count/sec |
Write capacity used |
ReadThrottleEvents |
Count |
Number of read requests throttled |
WriteThrottleEvents |
Count |
Number of write requests throttled |
SuccessfulRequestLatency |
Milliseconds |
Time taken to complete requests |
SystemErrors |
Count |
Internal server errors from DynamoDB |
📌 Key Notes:
- Metrics are stored for 15 months for historical analysis.
- Can set alarms to trigger Auto Scaling or SNS notifications.
- Supports high-resolution metrics (1-second intervals) for faster reaction time.
-
Custom metrics can be created for application-specific KPIs using:
aws cloudwatch put-metric-data --namespace "MyApp" --metric-name "PageLoadTime" --value 2.5 --unit Seconds
🚀 Pro Tip for Certification:
-
EC2: CPUUtilization > 80% ⇒ Trigger Auto Scaling.
-
Lambda: Monitor
Throttles
for concurrency limits.
-
S3: Use
4xxErrors
+ 5xxErrors
to troubleshoot access issues.
-
RDS: Watch
ReplicaLag
for replication delays.
-
DynamoDB: Keep an eye on throttled events for scaling needs.