AWS Certified Solutions Architect – Associate (SAA-C02) — Question 567
An ecommerce company has an order-processing application that uses Amazon API Gateway and an AWS Lambda function. The application stores data in an
Amazon Aurora PostgreSQL database. During a recent sales event, a sudden surge in customer orders occurred. Some customers experienced timeouts, and the application did not process the orders of those customers.
A solutions architect determined that the CPU utilization and memory utilization were high on the database because of a large number of open connections. The solutions architect needs to prevent the timeout errors while making the least possible changes to the application.
Which solution will meet these requirements?
Answer options
- A. Configure provisioned concurrency for the Lambda function. Modify the database to be a global database in multiple AWS Regions.
- B. Use Amazon RDS Proxy to create a proxy for the database. Modify the Lambda function to use the RDS Proxy endpoint instead of the database endpoint.
- C. Create a read replica for the database in a different AWS Region. Use query string parameters in API Gateway to route traffic to the read replica.
- D. Migrate the data from Aurora PostgreSQL to Amazon DynamoDB by using AWS Database Migration Service (AWS DMS). Modify the Lambda function to use the DynamoDB table.
Correct answer: B
Explanation
Amazon RDS Proxy resolves database connection scaling issues by pooling and sharing established database connections, which significantly reduces the CPU and memory overhead on the Aurora PostgreSQL database. Implementing RDS Proxy requires minimal application modifications, as it only involves updating the database connection endpoint in the Lambda function. Other options, such as migrating to DynamoDB or setting up cross-region replication, require extensive architectural changes and do not directly address the connection pooling issue.