DOP-C02 Monitoring and Logging Practice Question
A company runs a web application on Amazon EC2 instances behind an Application Load Balancer. The DevOps team wants to receive an alert when the number of HTTP 5xx errors from the load balancer exceeds 100 in a 5-minute period. The team wants to use the most direct and least complex method. What should they do?
⚠ Common exam trap
The trap here is overcomplicating the solution by using access logs or CloudTrail, when a built-in CloudWatch metric already provides the needed data.
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
✓
Create a CloudWatch alarm on the HTTPCode_ELB_5XX_Count metric for the load balancer with a threshold of 100 over 5 minutes, and configure an Amazon SNS topic for notifications.
Application Load Balancers automatically publish the HTTPCode_ELB_5XX_Count metric to CloudWatch, so creating an alarm on that metric with an SNS notification is the most direct and least complex solution. The other options involve unnecessary complexity or use services that do not monitor HTTP errors.
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 instances to collect web server logs, and create a custom metric for 5xx errors with an alarm.
Why it's wrong here
The load balancer already emits 5xx metrics without needing instance-level agents. Installing the CloudWatch agent on each EC2 instance adds operational overhead and may not accurately reflect load balancer-level errors, especially if some errors originate at the load balancer itself. This is more complex and less direct than using the built-in metric.
- ✗
Configure AWS CloudTrail to log load balancer API calls and create an EventBridge rule to trigger an SNS notification when 5xx errors occur.
Why it's wrong here
CloudTrail records API calls made to the load balancer service, not HTTP errors from client requests. EventBridge cannot trigger on HTTP 5xx counts because those are not API events. This approach would never detect the actual error condition and is fundamentally the wrong tool for application-level monitoring.
- ✓
Create a CloudWatch alarm on the HTTPCode_ELB_5XX_Count metric for the load balancer with a threshold of 100 over 5 minutes, and configure an Amazon SNS topic for notifications.
Why this is correct
The Application Load Balancer publishes the HTTPCode_ELB_5XX_Count metric to CloudWatch. Creating an alarm directly on this metric with a 5-minute period and a threshold of 100, then attaching an SNS topic for email or SMS notifications, is the simplest and most direct way to meet the requirement. No additional agents or complex configurations are needed.
- ✗
Enable access logs on the load balancer, then use CloudWatch Logs metric filters to count 5xx errors and create an alarm on the resulting metric.
Why it's wrong here
Access logs provide detailed request information, but using metric filters adds complexity: you must enable access logs, define a filter pattern, and then create an alarm. This is more steps than using the built-in CloudWatch metric. While it works, it is not the least complex method and may introduce latency in metric generation.
Go deeper
Related to this question
About these practice questions
Courseiva writes every DOP-C02 question from scratch — 1,298 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 →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint
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.