Skip to Content

DVA-C02: How to Improve the Responsiveness of Your APIs with Amazon API Gateway and AWS Lambda

Discover how to use Amazon API Gateway and AWS Lambda to create APIs that are fast, scalable, and secure. Learn how to enable API caching, configure usage plans, and more.

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.

This action can help the company achieve the goal of enhancing the responsiveness of the APIs because API caching can reduce the number of calls made to the backend Lambda functions and also improve the latency of requests to the API. By enabling API caching for a stage, API Gateway caches responses from the Lambda functions for a specified time-to-live (TTL) period, in seconds. API Gateway then responds to the request by looking up the Lambda function response from the cache instead of making a request to the Lambda function. The default TTL value for API caching is 300 seconds. The maximum TTL value is 3600 seconds.

The other options are not correct because:

  • Option B: Configuring API Gateway to use an interface VPC endpoint does not enhance the responsiveness of the APIs, but rather improves the security of the private APIs by allowing them to be accessed only from within a VPC. Interface endpoints are powered by AWS PrivateLink, a technology that enables private access to AWS services by using private IP addresses.
  • Option C: Enabling cross-origin resource sharing (CORS) for the APIs does not enhance the responsiveness of the APIs, but rather allows web browsers to make cross-origin requests to the APIs. CORS is a W3C standard that allows a server to relax the same-origin policy and explicitly allow some cross-origin requests while rejecting others.
  • Option D: Configuring usage plans and API keys in API Gateway does not enhance the responsiveness of the APIs, but rather allows customers to access selected APIs and sets throttling and quota limits for requests to those APIs. Usage plans use API keys to identify API clients and who can access the associated API stages for each key.

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