DVA-C03 practice question: Tracing with X-Ray (2 of 2)
Troubleshooting and Optimization A free question from our original DVA-C03 practice exam. Try it, then open the answer to see why each option is right or wrong.
A checkout API is an Amazon API Gateway REST API that invokes a Lambda function.
Operations want production traces with two segments per request, one for API Gateway and one for the function, so they can see where the time goes. The function's code must not change, and the team wants its execution role to stay limited to what it needs.
Which TWO actions are required? (Choose two.)
Choose two answers.
AA. Enable X-Ray tracing on the API Gateway stage, so the API's segment is recorded.
BB. Run the X-Ray daemon on an EC2 instance in the function's VPC and point the function at it.
CC. Turn on CloudTrail data events for the function so that its invocations are traced.
DD. Turn on active tracing for the function, and make sure its execution role allows X-Ray writes.
EE. Turn on detailed CloudWatch metrics for the API Gateway stage, so that segments appear.
B. Wrong: Lambda sends trace data from its own managed environment, so the function does not need a daemon on an EC2 instance. This adds work with no effect on the segments.
C. Wrong: CloudTrail records API activity for auditing. It does not record X-Ray segments or show request timing.
E. Wrong: Detailed metrics add CloudWatch metrics for the stage's requests. They do not create X-Ray segments or join the two services' traces.
Explanation
End-to-end traces need every service in the path to record its own segment. The API Gateway stage must have X-Ray tracing on, and the Lambda function must have active tracing with an execution role that allows X-Ray writes. CloudTrail and metrics do not create trace segments.
Want more on Tracing with X-Ray? The 5 full-length practice sets have 11 more Tracing with X-Ray questions, 390 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets →