X-Ray traces requests as they travel through your distributed application, showing where time is spent and where errors occur across services — essential for debugging microservices and serverless apps.
The tell
When a scenario needs to find performance bottlenecks or trace a request across multiple services (API Gateway → Lambda → DynamoDB), that’s X-Ray. CloudWatch tells you that something is slow; X-Ray shows you where in the request path. Distributed tracing → X-Ray.
Tracing vs metrics and logs
X-Ray helps follow a request across service boundaries and inspect latency segments, faults, and errors. CloudWatch metrics and alarms are useful for monitoring thresholds and trends; CloudWatch Logs Insights is for querying log events. These tools complement one another rather than being interchangeable.
Exam traps: Choose tracing when the question asks which downstream component added latency to a request. Choose an alarm for threshold-based notification or automated action, and Logs Insights when the requirement is to query log records. Instrumentation, sampling, and permissions affect what trace data is available.
Test yourself
A serverless app spanning API Gateway, Lambda, and DynamoDB is slow, and the team needs to see which component causes the latency in a request. Which service?
- Amazon CloudWatch metrics alone
- AWS X-Ray
- AWS CloudTrail
- AWS Config
👉 Click to reveal the answer & explanation
Correct answer: B. X-Ray provides end-to-end distributed tracing, pinpointing which service in the request path adds latency or errors. CloudWatch metrics (A) show that it’s slow but not where; CloudTrail (C) logs API calls; Config (D) tracks configuration.
Related topics
Amazon CloudWatch · AWS Lambda · API Gateway
Build your AWS certification readiness
Stop guessing whether you’re ready. Our full-length, exam-realistic practice exams put you through the exact question style you’ll face — with a detailed explanation behind every answer, so you learn why, not just what.
- ✓ 6 full-length practice exams
- ✓ A detailed explanation for every single question
- ✓ Realistic, scenario-based questions — not memory dumps
- ✓ 6 months of access to your selected certification pack
Explore the SAA-C03 Premium Practice Exams →or try the free SAA-C03 diagnostic first