Question #598
A developer has configured an Amazon API Gateway to integrate with an AWS Lambda function for handling client requests. During performance testing, clients report receiving timeout errors from the API, even though the Lambda function completes processing within the expected duration. Which two Amazon CloudWatch metrics for API Gateway should the developer analyze to identify the cause of the timeouts? (Select two.)
CacheHitCount
IntegrationLatency
CacheMissCount
Latency
Count
Explanation
The developer should analyze IntegrationLatency and Latency because:
- IntegrationLatency (B) measures the time taken by the Lambda function (backend) to process the request. If this exceeds expectations, it indicates delays in Lambda execution or integration overhead (e.g., cold starts, network latency).
- Latency (D) represents the total time from when API Gateway receives the request until it returns a response. If this exceeds the client's timeout threshold, it explains the errors, even if Lambda completes quickly.
Other options are less relevant:
- CacheHitCount (A)/CacheMissCount (C) relate to API caching, which isn't mentioned in the problem.
- Count (E) tracks request volume but doesn't explain timeouts.
Key Takeaway: Timeouts can occur if either the backend (IntegrationLatency) or API Gateway's total processing (Latency) exceeds client expectations, even if Lambda itself is fast.
Answer
The correct answer is: BD