How to Monitor EC2 Memory Utilization with CloudWatch Agent
A SysOps administrator needs to monitor memory utilization on an Amazon EC2 instance. Memory metrics are not available by default in Amazon CloudWatch for EC2 instances. Which action should the administrator take to collect memory utilization metrics?
Quick Answer
The correct answer is to install the CloudWatch agent on the EC2 instance. This is because standard EC2 monitoring only captures hypervisor-level metrics like CPU, network, and disk I/O, but memory utilization is an in-guest metric that requires the CloudWatch agent to read the operating system’s memory counters and publish them as custom metrics to CloudWatch. On the AWS Certified SysOps Administrator Associate SOA-C02 exam, this scenario tests your understanding of the distinction between default and custom metrics, often appearing in questions about monitoring gaps or troubleshooting performance. A common trap is assuming that enabling detailed monitoring or using the older SSM agent alone will collect memory data—neither does; only the CloudWatch agent with the proper configuration can collect EC2 memory metrics. Remember the mnemonic: “Default is hypervisor, memory needs a visitor”—the CloudWatch agent is the visitor inside the guest OS.
⚠ Common exam trap
Watch out — candidates often confuse 'detailed monitoring' (which increases metric frequency) with the ability to collect new metric types, assuming it will magically include memory metrics when it only affects existing hypervisor-level metrics.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Install the CloudWatch agent on the EC2 instance
The CloudWatch agent is the correct solution because it can collect custom metrics, including memory utilization, from EC2 instances. Unlike the default hypervisor-level metrics (CPU, network, disk), memory metrics require an in-guest agent to read the operating system's memory counters and publish them to CloudWatch.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Install the CloudWatch agent on the EC2 instance
Why this is correct
The CloudWatch agent can collect memory and other system-level metrics from the EC2 instance and publish them to CloudWatch custom metrics.
- ✗
Enable detailed monitoring on the EC2 instance
Why it's wrong here
Enabling detailed monitoring on an EC2 instance provides one-minute metric granularity for CPU, network, and disk metrics, but not memory.
- ✗
Use an AWS Lambda function to query the EC2 instance for memory metrics
Why it's wrong here
AWS Lambda does not have native access to EC2 instance metrics without installing a telemetry agent, which is not a built-in capability.
- ✗
Use Amazon Inspector to collect memory metrics
Why it's wrong here
Amazon Inspector is for vulnerability assessments and does not collect performance metrics like memory utilization.
Go deeper
Related to this question
About these practice questions
Courseiva writes every SOA-C02 question from scratch — 247 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on SOA-C02
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A SysOps administrator needs to monitor memory utilization of an Amazon EC2 instance. The default Amazon CloudWatch metrics for EC2 do not include memory utilization. Which solution should the administrator implement to collect memory metrics and set alarms?
medium- ✓ A.Install the CloudWatch agent on the instance and configure it to collect memory metrics
- B.Enable detailed monitoring on the EC2 instance
- C.Use AWS Systems Manager Patch Manager to report memory usage
- D.Use AWS CloudTrail to log memory events
Why A: The CloudWatch agent is specifically designed to collect custom metrics, such as memory utilization, from EC2 instances and on-premises servers. Unlike the default EC2 metrics, which only capture hypervisor-level metrics (e.g., CPU, disk I/O, network), memory utilization requires OS-level access. The CloudWatch agent uses the `mem` plugin to gather memory data and can publish it to CloudWatch as custom metrics, enabling alarm configuration.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This SOA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SOA-C02 exam.