
Answer-first summary for fast verification
Answer: Use AWS X-Ray SDK for the Lambda function, including HTTP/HTTPS interceptors and SDK client handlers, and analyze the service map after enabling X-Ray tracing to identify the issue.
The best practice to identify the cause of increased response time in a serverless environment is to use tracing tools that provide detailed insights into all the components of your application. AWS X-Ray is designed for this purpose. By instrumenting the Lambda function with the AWS X-Ray SDK and adding HTTP/HTTPS interceptors and SDK client handlers, you can get a comprehensive view of the interactions and latencies within your application. The X-Ray service map will help you visually pinpoint the source of performance issues by showing average response times for each segment of the system. Thus, option B is the correct answer.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
In a serverless user portal with performance issues traced to an Amazon API Gateway endpoint connected to a Lambda function, how should a developer identify the cause of increased response time using best practices?
A
Add high-precision timestamps in the Lambda function's logs before and after external requests, then analyze the CloudWatch logs to find the source of the delay.
B
Use AWS X-Ray SDK for the Lambda function, including HTTP/HTTPS interceptors and SDK client handlers, and analyze the service map after enabling X-Ray tracing to identify the issue.
C
Examine the Lambda function's CloudWatch metrics, particularly Duration and Throttles, using anomaly detection to pinpoint the likely sources of increased response time.
D
Deploy a CloudWatch Synthetics canary with X-Ray tracing to scan the portal, then review the canary's metrics on the dashboard to determine the performance bottlenecks.
No comments yet.