Courseiva
Monitoring and Logging →mediumMultiple Choice

DOP-C02 Monitoring and Logging Practice Question

Network Topology
$ aws cloudwatch get-metric-statisticsnamespace AWS/EC2metric-name CPUUtilizationdimensions Name=InstanceIdstart-time 2023-01-01T00:00:00Zend-time 2023-01-02T00:00:00Zperiod 300statistics AverageRefer to the exhibit.```

A DevOps engineer runs the command above to retrieve CPU utilization for an EC2 instance, but gets no data points. The instance is running and has basic monitoring enabled. What is the most likely reason?

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

✓

The IAM user executing the command lacks 'cloudwatch:GetMetricStatistics' permission.

The command likely fails because the IAM user executing it does not have the 'cloudwatch:GetMetricStatistics' permission. Basic monitoring publishes CPUUtilization metrics every 5 minutes (300 seconds), so a period of 300 seconds is valid. The dimension name 'InstanceId' is correct as shown. Option A is wrong because the dimension name is case-sensitive and 'InstanceId' is correct. Option B is wrong because basic monitoring is enabled by default and publishes CPUUtilization. Option C is wrong because 300 seconds equals the default 5-minute interval, which is the minimum supported period for basic monitoring.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    The dimension name should be 'InstanceId' with a different case.

    Why it's wrong here

    CloudWatch dimension names are case-sensitive, and the exact name for EC2 instance metrics is 'InstanceId'. In this command, the dimension is correctly spelled with capital I and D, so it is not a mismatch that would cause an empty result. Other casings like 'instanceid' or 'instanceID' would return no data, but the command under consideration uses the correct form.

  • ✗

    The instance has basic monitoring disabled.

    Why it's wrong here

    Basic monitoring is automatically enabled for every EC2 instance when it is launched and publishes metrics every five minutes, with no additional cost. Because the requested period matches the basic monitoring interval, the instance should have CloudWatch data points if it is running and healthy. Therefore, disabled basic monitoring cannot be the cause of the empty output, as there is no way to disable basic monitoring without stopping metric publication entirely.

  • ✗

    The period of 300 seconds is less than the minimum supported period.

    Why it's wrong here

    The Period parameter in a GetMetricStatistics request defines the length of time for each data point, and valid values include 60, 300, and 3600 seconds (subject to the metric's storage resolution). For EC2 basic monitoring, the minimum supported period is 300 seconds, so the requested 300-second period is exactly at the minimum and fully supported. The period therefore is not the reason why the command returned no CPU utilization data.

  • ✓

    The IAM user executing the command lacks 'cloudwatch:GetMetricStatistics' permission.

    Why this is correct

    The IAM user must have the cloudwatch:GetMetricStatistics permission to call the CloudWatch API and retrieve metric statistics. If the IAM policy attached to the user does not explicitly allow this action, the request is denied and no CPUUtilization data points are returned. Since the namespace, metric name, dimensions, and period are all valid, the most plausible reason for the lack of data is that the IAM permission is missing.

About these practice questions

This DOP-C02 question is part of Courseiva's 1,298-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 →

How Courseiva writes practice questions · Editorial policy

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.