Courseiva
Monitoring and Logging →mediumMultiple Choice

DOP-C02 Monitoring and Logging Practice Question

A company runs a serverless application using AWS Lambda and Amazon API Gateway. The application processes user uploads to an S3 bucket. The operations team uses CloudWatch Logs for monitoring, but they are finding it difficult to correlate logs across multiple Lambda functions that handle different parts of the workflow. The team wants to trace requests as they flow through the application and identify bottlenecks or errors. The team has already enabled CloudWatch Logs for all Lambda functions. What should the team do to achieve end-to-end request tracing?

⚠ Common exam trap

DOP-C02 often tests the difference between logging/auditing (CloudTrail, CloudWatch Logs) and distributed tracing (X-Ray), so candidates who focus on 'correlating logs' pick ServiceLens or Contributor Insights instead of enabling X-Ray.

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

✓

Enable AWS X-Ray on the Lambda functions and API Gateway to trace requests end-to-end.

AWS X-Ray is the native distributed tracing service that integrates with Lambda and API Gateway to trace requests end-to-end across services. Enabling X-Ray on the Lambda functions and API Gateway propagates a trace ID through the workflow, letting the team visualize the full request path, latency per segment, and errors. CloudWatch ServiceLens can then surface the X-Ray traces alongside logs and metrics for correlation.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Use CloudWatch Contributor Insights to analyze the log data and identify the top contributors to latency.

    Why it's wrong here

    CloudWatch Contributor Insights is designed for high-cardinality analysis of log data, aggregating fields (e.g., IP addresses, user agents, or URL paths) to rank top contributors to metrics like latency or error count. While it can identify the noisiest customers or endpoints that correlate with slow responses, it operates on pre-aggregated time-series from a single log group and does not follow an individual request across multiple services. It lacks the concept of a trace ID or segment propagation, so it cannot reconstruct the end-to-end path a specific request takes through API Gateway and Lambda.

  • ✗

    Use AWS CloudTrail to log all API calls and correlate them with CloudWatch Logs.

    Why it's wrong here

    AWS CloudTrail records control-plane and data-plane API calls made by users or services for auditing and security purposes, such as when an IAM role invokes a Lambda function or updates an API Gateway deployment. Although you can correlate CloudTrail events with CloudWatch Logs using request IDs or timestamps, this only tells you that an API call occurred, not how the request was processed internally, which Lambda function executed, or what downstream calls were made. CloudTrail is not an application tracing tool; it lacks the trace context and subsegment data needed to measure latency across the services involved in a single user request.

  • ✗

    Create a CloudWatch ServiceLens service map to visualize the application components.

    Why it's wrong here

    CloudWatch ServiceLens provides a consolidated view of service maps, traces, metrics, and logs, but it is purely a visualization and analytics layer. It must consume trace data that has already been generated by AWS X-Ray or other instrumented agents; creating a ServiceLens service map without enabling X-Ray on your Lambda functions and API Gateway yields no trace data to display. ServiceLens can help you interpret X-Ray traces, but it cannot initiate or propagate trace context across services, so on its own it does not trace requests end-to-end.

  • ✓

    Enable AWS X-Ray on the Lambda functions and API Gateway to trace requests end-to-end.

    Why this is correct

    AWS X-Ray provides distributed tracing by propagating a trace ID across instrumented services and recording segments and subsegments for each component. Enabling X-Ray on API Gateway and Lambda functions (e.g., via active tracing on the API Gateway stage and the Lambda execution role with X-Ray permissions) captures the full lifecycle of a request, including the API Gateway frontend, Lambda invocation, and any downstream SDK calls or HTTP requests. This allows you to follow a specific request through the entire architecture, view a service map, and drill into per-service latency, errors, and annotations, making it the correct solution for end-to-end tracing.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

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 →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on DOP-C02

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A company runs a serverless application using AWS Lambda, Amazon API Gateway, and Amazon DynamoDB. The application is used by thousands of users. Recently, the operations team noticed an increase in 5xx errors from API Gateway. The team has enabled CloudWatch Logs for the Lambda functions and API Gateway. They see the errors are sporadic and not correlated with high traffic. The Lambda function's error count in CloudWatch is also increasing. The team wants to identify the specific requests that are failing and understand the error details. Which solution should the team implement?

medium
  • A.Use CloudWatch Logs Insights to query the Lambda logs for ERROR messages and correlate with API Gateway logs
  • B.Enable VPC Flow Logs for the Lambda function's VPC to capture network traffic
  • ✓ C.Enable AWS X-Ray active tracing on the Lambda functions and API Gateway to capture detailed request traces and error details
  • D.Enable AWS CloudTrail to log API Gateway API calls and analyze the logs

Why C: AWS X-Ray active tracing on Lambda and API Gateway captures end-to-end request traces, including downstream calls to DynamoDB, latency breakdowns, and exception details for each failing invocation. Because the errors are sporadic and not traffic-correlated, X-Ray's per-request trace view is the fastest way to pinpoint which specific requests fail and why. CloudWatch Logs alone would require manual correlation across services and lacks the trace context X-Ray provides.

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.