ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 80 - DVA-C02 discussion

Report
Export

A company developed an API application on AWS by using Amazon CloudFront. Amazon API Gateway, and AWS Lambd a. The API has a minimum of four requests every second A developer notices that many API users run the same query by using the POST method. The developer wants to cache the POST request to optimize the API resources.

Which solution will meet these requirements'?

A.
Configure the CloudFront cache Update the application to return cached content based upon the default request headers.
Answers
A.
Configure the CloudFront cache Update the application to return cached content based upon the default request headers.
B.
Override the cache method in me selected stage of API Gateway Select the POST method.
Answers
B.
Override the cache method in me selected stage of API Gateway Select the POST method.
C.
Save the latest request response in Lambda /tmp directory Update the Lambda function to check the /tmp directory
Answers
C.
Save the latest request response in Lambda /tmp directory Update the Lambda function to check the /tmp directory
D.
Save the latest request m AWS Systems Manager Parameter Store Modify the Lambda function to take the latest request response from Parameter Store
Answers
D.
Save the latest request m AWS Systems Manager Parameter Store Modify the Lambda function to take the latest request response from Parameter Store
Suggested answer: A

Explanation:

This solution will meet the requirements by using Amazon CloudFront, which is a content delivery network (CDN) service that speeds up the delivery of web content and APIs to end users. The developer can configure the CloudFront cache, which is a set of edge locations that store copies of popular or recently accessed content close to the viewers. The developer can also update the application to return cached content based upon the default request headers, which are a set of HTTP headers that CloudFront automatically forwards to the origin server and uses to determine whether an object in an edge location is still valid. By caching the POST requests, the developer can optimize the API resources and reduce the latency for repeated queries. Option B is not optimal because it will override the cache method in the selected stage of API Gateway, which is not possible or effective as API Gateway does not support caching for POST methods by default. Option C is not optimal because it will save the latest request response in Lambda /tmp directory, which is a local storage space that is available for each Lambda function invocation, not a cache that can be shared across multiple invocations or requests. Option D is not optimal because it will save the latest request in AWS Systems Manager Parameter Store, which is a service that provides secure and scalable storage for configuration data and secrets, not a cache for API responses.

Reference: [Amazon CloudFront], [Caching Content Based on Request Headers]

asked 16/09/2024
Felipe Huichacura
31 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first