AWS Certified Developer – Associate — Question 51
An AWS Lambda function accesses two Amazon DynamoDB tables. A developer wants to improve the performance of the Lambda function by identifying bottlenecks in the function.
How can the developer inspect the timing of the DynamoDB API calls?
Answer options
- A. Add DynamoDB as an event source to the Lambda function. View the performance with Amazon CloudWatch metrics
- B. Place an Application Load Balancer (ALB) in front of the two DynamoDB tables. Inspect the ALB logs
- C. Limit Lambda to no more than five concurrent invocations. Monitor from the Lambda console.
- D. Enable AWS X-Ray tracing for the function. View the traces from the X-Ray service.
Correct answer: D
Explanation
The correct answer is D because enabling AWS X-Ray tracing allows the developer to trace the execution of the Lambda function and measure the latency of the DynamoDB API calls. The other options do not provide insights into the timing of API calls; for example, A focuses on CloudWatch metrics which do not give detailed tracing, B involves ALB which is not applicable to DynamoDB, and C limits concurrent executions without addressing performance bottlenecks.