DOP-C02 Incident and Event Response Practice Question
A company has a legacy application running on an EC2 instance that is not part of an Auto Scaling group. The instance is experiencing a memory leak. The DevOps engineer needs to collect memory metrics to analyze the issue without modifying the application. What should the engineer do?
⚠ Common exam trap
Many exam-takers assume the EC2 monitoring tab or detailed monitoring includes memory metrics, but AWS does not provide OS-level metrics (memory, disk space, swap usage) without the CloudWatch agent.
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 instance and configure it to collect memory metrics.
The CloudWatch agent is required to collect custom metrics like memory utilization from an EC2 instance because the standard EC2 monitoring only captures hypervisor-level metrics (CPU, network, disk I/O). By installing and configuring the CloudWatch agent, the engineer can collect memory metrics without modifying the application code, directly addressing the memory leak analysis requirement.
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 instance and configure it to collect memory metrics.
Why this is correct
The default EC2 monitoring only exposes hypervisor-level metrics like CPU, network, and disk I/O; memory utilization is a guest-OS metric that AWS cannot see without an in-guest component. Installing the unified CloudWatch agent (with the `mem_used_percent` and similar metrics in the agent's JSON config) and starting the `amazon-cloudwatch-agent` service enables the agent to publish memory metrics to CloudWatch, making them available for alarms and dashboards. This is required because no amount of instance-level monitoring settings can surface guest-OS memory.
- ✗
Use the AWS Management Console to view memory metrics from the EC2 monitoring tab.
Why it's wrong here
The EC2 monitoring tab in the AWS Management Console displays only the metrics that CloudWatch collects automatically from the hypervisor — CPU, network, disk I/O, and status checks — none of which represent the OS-level memory usage. Since memory metrics are not sent by the hypervisor, they are simply absent from the console's graphs. Even enabling detailed monitoring changes only the collection frequency of these existing metrics, not their scope, so the console will still lack memory utilization data.
- ✗
Use EC2Rescue to generate a memory dump and analyze it.
Why it's wrong here
EC2Rescue is an offline diagnostic tool used for one-time troubleshooting of specific issues such as boot failures, disk errors, or OS-level crashes; it is not designed to run as a persistent agent and does not publish streaming metrics to CloudWatch. Running EC2Rescue to generate a memory dump would provide a point-in-time snapshot for forensic analysis, not ongoing memory utilization monitoring. Therefore, it cannot serve as a solution for continuously collecting and alarming on memory metrics.
- ✗
Enable CloudWatch detailed monitoring on the instance.
Why it's wrong here
CloudWatch detailed monitoring increases the granularity of the existing default EC2 metrics — for example, changing the period for CPU utilization from 5 minutes to 1 minute — but it does not introduce new metric dimensions. The hypervisor still does not report memory utilization because memory is a guest-OS resource that the hypervisor cannot directly measure. Thus, enabling detailed monitoring would only give you more frequent CPU or network data points, leaving memory metrics completely absent.
Go deeper
Related to this question
About these practice questions
This DOP-C02 question is part of Courseiva's 1,013-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DOP-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 DOP-C02 exam.