Learn how to optimize API responsiveness by enabling API caching in Amazon API Gateway. Reduce latency for frequent unauthenticated requests.
Table of Contents
Question
A company is offering APIs as a service over the internet to provide unauthenticated read access to statistical information that is updated daily. The company uses Amazon API Gateway and AWS Lambda to develop the APIs. The service has become popular, and the company wants to enhance the responsiveness of the APIs.
Which action can help the company achieve this goal?
A. Enable API caching in API Gateway.
B. Configure API Gateway to use an interface VPC endpoint.
C. Enable cross-origin resource sharing (CORS) for the APIs.
D. Configure usage plans and API keys in API Gateway.
Answer
A. Enable API caching in API Gateway.
Explanation
The correct answer is A. Enable API caching in API Gateway.
The reason is that API caching in API Gateway can improve the performance and responsiveness of the APIs by storing the responses of the API requests in a cache. The cache can reduce the number of requests that are sent to the backend service, such as Lambda, and return the cached responses to the clients faster. This can also reduce the latency and cost of the API calls. API caching in API Gateway is especially useful for APIs that provide read access to data that does not change frequently, such as statistical information that is updated daily.
The other options are incorrect because they do not enhance the responsiveness of the APIs or they are not applicable to the scenario:
B. Configuring API Gateway to use an interface VPC endpoint can improve the security and reliability of the APIs by allowing private access to API Gateway from within a virtual private cloud (VPC). However, this option does not improve the responsiveness of the APIs, and it is not applicable to the scenario where the APIs are offered over the internet.
C. Enabling cross-origin resource sharing (CORS) for the APIs can allow web browsers to access the APIs from different domains or origins. However, this option does not improve the responsiveness of the APIs, and it is only relevant for web applications that use JavaScript to make AJAX requests to the APIs.
D. Configuring usage plans and API keys in API Gateway can help to control and monitor the usage of the APIs by different clients or customers. However, this option does not improve the responsiveness of the APIs, and it is not applicable to the scenario where the APIs provide unauthenticated access to the data.
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.