DOP-C02 Monitoring and Logging Practice Question
A DevOps engineer supports a Python application on AWS Lambda that writes structured JSON logs to CloudWatch Logs. When a request fails, the engineer must be able to search all invocations across a log group for a specific request ID and see only lines containing that ID, returning results in seconds. Which approach meets this requirement with the least effort?
⚠ Common exam trap
Many candidates confuse metric filters, which only emit numeric metrics, with query tools that can actually return matching log lines.
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
✓
Use CloudWatch Logs Insights with a query that filters on the request ID field parsed from the JSON log events.
CloudWatch Logs Insights is purpose-built for interrogating log groups with a query language that understands JSON, so filtering on a request ID field returns the exact log lines quickly. It works against the existing log group without new infrastructure, which satisfies both the speed and minimal-effort constraints.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Create a CloudWatch Logs metric filter that matches the request ID pattern and graph the resulting metric on a dashboard.
Why it's wrong here
Metric filters produce numeric metrics and cannot return the original log lines containing the request ID. The engineer needs to read the specific log events, not just count occurrences, so a metric filter does not satisfy the search requirement.
- ✗
Subscribe the log group to a Lambda function that scans events and writes matches to an Amazon DynamoDB table.
Why it's wrong here
A Lambda subscription processes only new log events in near real time; it does not search historical events already stored in the log group. Building a DynamoDB index also adds significant development and operational overhead compared to a built-in query tool.
- ✓
Use CloudWatch Logs Insights with a query that filters on the request ID field parsed from the JSON log events.
Why this is correct
CloudWatch Logs Insights parses JSON log events automatically, so a query can filter on the request ID field and return matching lines in seconds across the entire log group. This requires no additional infrastructure, making it the lowest-effort solution for the stated search requirement.
- ✗
Export the log group to Amazon S3 and query it with Amazon Athena using a Glue table.
Why it's wrong here
Exporting logs to S3 is asynchronous and can take many minutes, so results would not be available in seconds. It also introduces Glue catalog and Athena configuration overhead that is unnecessary when CloudWatch Logs Insights can query the log group directly.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
About these practice questions
One of 1,298 original DOP-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.