Lesson 4-AWS SysOps Administrator Associate

CloudWatch Metrics for EC2

Understand AWS-provided and custom CloudWatch metrics for EC2 instances, including monitoring intervals and key performance indicators.

15 Topics
5 Quiz Questions
60 XP Reward

What You'll Learn

1

Monitoring Your EC2 Instances

Amazon CloudWatch is AWS's monitoring and observability service that collects metrics from your EC2 instances. Understanding what metrics are available, how often they're collected, and what's NOT automatically monitored is crucial for effective CloudOps. This knowledge helps you set up proper monitoring, alerting, and capacity planning for your infrastructure.

Key Point

CloudWatch provides both AWS-managed metrics (pushed automatically) and the ability to publish custom metrics.

Vocabulary

Key Terms

|

A time-ordered set of data points representing a measurable attribute of a resource

|

The default free monitoring tier with metrics collected at 5-minute intervals

|

Paid monitoring option with metrics collected at 1-minute intervals for more granular visibility

Comparison

Basic vs Detailed Monitoring

FeatureBasic MonitoringDetailed Monitoring
Collection Interval5 minutes1 minute
CostFree (default)Additional charges apply
Data GranularityLess responsive to spikesBetter for detecting rapid changes
Use CaseDevelopment, non-critical workloadsProduction, Auto Scaling triggers

Detailed monitoring is recommended for production workloads and when using Auto Scaling

4

AWS-Provided EC2 Metrics

AWS automatically pushes certain metrics to CloudWatch for every EC2 instance. These metrics cover CPU utilization, network traffic, disk operations (for instance store only), and status checks. Understanding what's included helps you know when you need custom metrics.

Key Point

AWS provides metrics for CPU, Network, Disk (instance store), and Status Checks—but NOT RAM.

EC2 Metrics Categories

Categories of metrics available for EC2 instances

EC2 Metrics

AWS-provided metrics

CPU

Utilization, Credits

Network

In/Out bytes and packets

Disk

Instance store only

Status Checks

Instance, System, EBS

CPU Metrics

  • CPUUtilization: Percentage of allocated compute units in use
  • CPUCreditUsage: Number of CPU credits consumed (burstable instances)
  • CPUCreditBalance: Number of CPU credits accumulated (burstable instances)

Network Metrics

  • NetworkIn: Bytes received on all network interfaces
  • NetworkOut: Bytes sent out on all network interfaces
  • NetworkPacketsIn: Number of packets received
  • NetworkPacketsOut: Number of packets sent

Status Check Metrics

  • StatusCheckFailed_Instance: Checks the EC2 VM health (1 = failed, 0 = passed)
  • StatusCheckFailed_System: Checks the underlying hardware (1 = failed, 0 = passed)
  • StatusCheckFailed_AttachedEBS: Checks attached EBS volume health
  • StatusCheckFailed: Combined check (fails if any check fails)

RAM is NOT Included!

Memory (RAM) utilization is NOT included in AWS-provided EC2 metrics. To monitor RAM, you must install the CloudWatch Agent and publish custom metrics. This is one of the most common exam questions!

Disk Metrics Limitation

The Disk Read/Write metrics (DiskReadOps, DiskWriteOps, DiskReadBytes, DiskWriteBytes) are only available for instances using instance store volumes. EBS volumes have their own separate metrics in CloudWatch.

11

Custom Metrics

For metrics that AWS doesn't provide automatically—like RAM usage, disk space, or application-specific data—you need to publish custom metrics. Custom metrics can be published at different resolutions: Standard Resolution (1-minute granularity) or High Resolution (down to 1-second granularity). Publishing custom metrics requires proper IAM permissions on the EC2 instance role.

Key Point

Custom metrics require the CloudWatch Agent and proper IAM permissions to publish.

Comparison

Custom Metric Resolutions

ResolutionIntervalUse Case
Standard1 minute1 minuteMost monitoring needs
High Resolution1 secondUp to 1 secondReal-time monitoring, rapid scaling

High resolution metrics incur higher costs due to increased data volume

Common Custom Metrics

  • Memory (RAM) utilization and available memory
  • Disk space usage (percentage and absolute)
  • Application-level metrics (request counts, error rates)
  • Process-specific metrics (individual process CPU/memory)
  • Custom business metrics (transactions per second, active users)

IAM Permissions Required

To publish custom metrics, the EC2 instance role must have the cloudwatch:PutMetricData permission. Without this, the CloudWatch Agent cannot send metrics to CloudWatch.

Reflection

Pause & Ponder

Why do you think AWS doesn't include RAM metrics by default?

  • Consider the hypervisor's visibility into the guest OS
  • Think about what the hypervisor can see vs. what runs inside the instance
  • How does this differ from CPU utilization measurement?

Ready to Start Learning?

Dive deeper into this lesson with our interactive learning experience. Complete the quiz and earn 60 XP!

Start This Lesson

Continue Your Journey