AWS Certified Developer – Associate — Question 341
A developer tests an application that a company developed by using AWS Lambda. The Lambda functions are behind an AmazonAPI Gateway API. The timeout for the API method is set to the same timeout as the Lambda functions. When a request is sent to the API, the responses are timing out.
Which action would help the developer troubleshoot this issue?
Answer options
- A. Check the IntegrationLatency metric of the API in Amazon CloudWatch
- B. Check the Duration metric for the Lambda functions in Amazon CloudWatch
- C. Check the Count metric of the API in Amazon CloudWatch
- D. Check the Errors metric for the Lambda functions in Amazon CloudWatch
Correct answer: B
Explanation
Checking the Duration metric for the Lambda functions in Amazon CloudWatch helps the developer determine if the functions are running to their maximum execution limit and causing the timeout. The IntegrationLatency metric measures the overall time from when API Gateway passes a request to the backend until it receives a response, but it does not isolate the Lambda function's internal execution time. Count and Errors metrics do not provide the specific execution timing details required to troubleshoot this latency issue.