A developer created an AWS Lambda function that calls multiple AWS services and observed that the function's execution time is higher than expected. The developer must investigate interactions between the services without modifying the function's code. Which approach meets this requirement?
Choose an answer
Tap an option to check your answer.
Correct answer: Enable AWS X-Ray active tracing for the Lambda function and examine the traces in X-Ray..
Why this is the answer
Enabling AWS X-Ray active tracing for the Lambda function allows you to visualize the function's execution, including calls to other AWS services. X-Ray provides a service map and detailed trace timelines, making it easy to identify bottlenecks and understand the latency contributed by each service interaction. This meets the requirement of investigating interactions without modifying code. AWS CloudTrail records API calls made to AWS services, but it doesn't provide detailed timing or performance metrics for individual service interactions within a Lambda function's execution. AWS Config records configuration changes to resources, not performance or interaction details. Inspecting CloudWatch logs for the Lambda function would show function logs and basic metrics, but not the detailed breakdown of inter-service calls and their latencies that X-Ray offers.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed