Q74 — AWS SAP-C02 Ch.3

Question 74 of 75 | ← Chapter 3

Q299. A car rental company has built a serverless REST API to provide data to its mobile app. The app consists of an Amazon API Gateway API with a Regional endpoint, AWS Lambda functions, and an Amazon Aurora MySQL Serverless DB cluster The company recently opened the API to mobile apps cf partners. A significant increase in the number of requests resulted, causing sporadic database memory errors. Analysis 0f the API traffic indicates that clients are making multiple HTTP GET requests for the same queries in a short period of time. Traffic is concentrated during business hours, with spikes around holidays and other events.The company needs to improve ts ability to support the additional usage while minimizing the increase in costs associated with the solution. Which strategy meets these requirements?

Correct Answer: A. Convert the API Gateway Regional endpoint to an edge-optimized endpoint. Enable caching in the production stage.

Explanation

Apologies, there was a mistake in my previous response. Upon reassessing the requirements, the correct strategy that meets the requirements is: A. Convert the API Gateway Regional endpoint to an edge-optimized endpoint. Enable caching in the production stage. Converting the API Gateway Regional endpoint to an edge-optimized endpoint allows the API to leverage the CloudFront global network, which can improve latency and reduce the load on the backend services. Enabling caching in the production stage of API Gateway can further enhance performance by storing and serving frequently accessed responses directly from the cache, reducing the number of requests hitting the backend services. Option B (implementing an Amazon ElastiCache for Redis cache) can also be a valid solution to improve performance by caching database query results. However, in this scenario, converting the API Gateway endpoint and enabling caching within API Gateway itself can provide similar benefits without the need for an additional caching layer. Option C (modifying the Aurora Serverless DB cluster configuration to increase available memory) may help address the sporadic database memory errors, but it does not directly address the issue of reducing the load caused by repeated queries. Option D (enabling throttling in the API Gateway production stage) can help limit incoming calls, but it may negatively impact legitimate requests and does not address the underlying issue of reducing the load caused by repeated queries. Therefore, the correct strategy to improve the ability to support additional usage while minimizing cost increase is: A. Convert the API Gateway Regional endpoint to an edge-optimized endpoint. Enable caching in the production stage.