Skip to Content

DVA-C02: How to Troubleshoot API Gateway Timeout Issues with CloudWatch Metrics

Learn how to use CloudWatch metrics to diagnose and fix API Gateway timeout issues when invoking Lambda functions. Find out which two metrics are most helpful for this task.

Table of Contents

Question

A developer is building a web application that uses Amazon API Gateway to expose an AWS Lambda function to process requests from clients. During testing, the developer notices that the API Gateway times out even though the Lambda function finishes under the set time limit.

Which of the following API Gateway metrics in Amazon CloudWatch can help the developer troubleshoot the issue? (Choose two.)

A. CacheHitCount
B. IntegrationLatency
C. CacheMissCount
D. Latency
E. Count

Answer

B. IntegrationLatency
D. Latency

Explanation

The answer to the question is B and D.

B. IntegrationLatency. This metric measures the time between when API Gateway relays a request to the backend (in this case, the Lambda function) and when it receives a response from the backend. This metric can help the developer troubleshoot the issue by indicating how long the Lambda function takes to process the request and return a response. If the IntegrationLatency is high, it means that the Lambda function is slow or unresponsive, which might cause API Gateway to time out.

D. Latency. This metric measures the time between when API Gateway receives a request from a client and when it returns a response to the client. The latency includes the integration latency and other API Gateway overhead. This metric can help the developer troubleshoot the issue by indicating how long the API call takes from end to end. If the Latency is high, it means that either the Lambda function or API Gateway is causing a delay, which might result in a timeout.

Option A is incorrect because CacheHitCount is not a relevant metric for this scenario. CacheHitCount measures the number of requests served from the API cache in a given period. This metric can help the developer optimize cache capacities and performance, but it does not affect the timeout issue.

Option C is incorrect because CacheMissCount is not a relevant metric for this scenario. CacheMissCount measures the number of requests served from the backend in a given period, when API caching is enabled. This metric can help the developer optimize cache capacities and performance, but it does not affect the timeout issue.

Option E is incorrect because Count is not a relevant metric for this scenario. Count measures the total number of API requests in a given period. This metric can help the developer monitor the traffic and usage of the API, but it does not affect the timeout issue.

The latest AWS Certified Developer – Associate DVA-C02 certification actual real practice exam question and answer (Q&A) dumps are available free, which are helpful for you to pass the AWS Certified Developer – Associate DVA-C02 exam and earn AWS Certified Developer – Associate DVA-C02 certification.

AWS Certified Developer - Associate DVA-C02 Exam Questions and Answers