P95 latency on an API spiked. The flow is API Gateway → Lambda → DynamoDB → third-party HTTP. Which X-Ray view shows WHICH segment is slow?
A.CloudWatch Lambda duration metric alone
Duration shows the Lambda total, not where inside it time went.
B.X-Ray service map and trace segments/subsegments
Correct — per-segment timing is X-Ray's core value.
C.API Gateway access logs
Access logs record request/response totals, no downstream breakdown.
D.VPC Flow Logs
Flow Logs are network-level metadata, unrelated to app latency.
Why this answer
X-Ray traces the request end-to-end — the service map shows node-level latency and each trace's segments/subsegments pinpoint whether DynamoDB or the downstream HTTP call is responsible. Aggregate metrics can't decompose per-dependency latency.
Correct answer: B · Last reviewed 2026-11-01
Official AWS references
Practice this interactively
Answer without seeing the solution first in the Debugging & Optimization practice session.
Practice Debugging & Optimization