Q61 — AWS DVA-C02 Ch.3
Question 61 of 100 | ← Chapter 3
A company recently deployed a new serverless user portal. Users report that a specific section of the portal is slow. Preliminary analysis identifies an Amazon API Gateway endpoint as the likely source of the issue. This endpoint integrates with an AWS Lambda function, which in turn interacts with other APIs and AWS services. How should the developer use operational best practices to identify the source of increased response time?
- A. Update the Lambda function by adding log statements with high-precision timestamps before and after each external request. Deploy the updated Lambda function. After collecting sufficient usage data, examine the Lambda function's Amazon CloudWatch logs to identify potential sources of increased response time.
- B. Instrument the Lambda function using the AWS X-Ray SDK. Add HTTP and HTTPS interceptors and SDK client handlers. Deploy the updated Lambda function. Enable X-Ray tracing. After collecting sufficient usage data, use the X-Ray service map to inspect average response times and identify potential sources. ✓
- C. View the Lambda function's Amazon CloudWatch metrics using the Metrics Explorer. Apply anomaly detection to the Duration and Throttles metrics. Review anomalies to identify potential sources.
- D. Create a new Canary using Amazon CloudWatch Synthetics. Enable AWS X-Ray tracing on the Canary. Configure the Canary to scan the user portal. After collecting sufficient usage data, use the CloudWatch Synthetics Canary dashboard to view the Canary's metrics.
Correct Answer: B. Instrument the Lambda function using the AWS X-Ray SDK. Add HTTP and HTTPS interceptors and SDK client handlers. Deploy the updated Lambda function. Enable X-Ray tracing. After collecting sufficient usage data, use the X-Ray service map to inspect average response times and identify potential sources.
Explanation
Option B provides a method to instrument the Lambda function using the AWS X-Ray SDK and enable tracing in X-Ray to identify the source of performance issues. X-Ray provides detailed service maps and metrics such as average response time, helping developers pinpoint performance bottlenecks. 【Lantern Certification provided by: swufelp1999】