AWS Certified Solutions Architect – Associate (SAA-C02) — Question 696
A company hosts a serverless application on AWS. The application uses Amazon API Gateway, AWS Lambda, and an Amazon RDS for PostgreSQL database.
The company notices an increase in application errors that result from database connection timeouts during times of peak traffic or unpredictable traffic. The company needs a solution that reduces the application failures with the least amount of change to the code.
What should a solutions architect do to meet these requirements?
Answer options
- A. Reduce the Lambda concurrency rate.
- B. Enable RDS Proxy on the RDS DB instance.
- C. Resize the RDS DB instance class to accept more connections.
- D. Migrate the database to Amazon DynamoDB with on-demand scaling.
Correct answer: B
Explanation
Amazon RDS Proxy establishes a database connection pool, allowing serverless Lambda functions to share connections and preventing connection exhaustion during traffic spikes with minimal code changes. Decreasing Lambda concurrency would throttle the application, while scaling the instance class is not cost-effective and does not address the root cause of connection pooling. Migrating to Amazon DynamoDB would require a massive database schema and application code rewrite, violating the 'least amount of change' constraint.