Courseiva
Monitoring and Logging →mediumMultiple Choice

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

ModelYou ManageProvider ManagesExamples
IaaSOS, runtime, apps, dataHardware, hypervisor, networkingEC2, Azure VMs, GCP Compute Engine
PaaSApps and dataOS, runtime, middleware, hardwareElastic Beanstalk, Azure App Service
SaaSData and settings onlyEverything elseMicrosoft 365, Salesforce, Workday
FaaS / ServerlessFunction code onlyInfra, scaling, runtimeLambda, Azure Functions, Cloud Run
CaaSContainers and appsKubernetes, OS, hardwareEKS, AKS, GKE

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 →

How Courseiva writes practice questions · Editorial policy

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.