An ecommerce application uses Amazon API Gateway and an AWS Lambda function, storing data in an Amazon Aurora PostgreSQL database. During a sales event a surge in orders caused timeouts. The solutions architect found high CPU and memory on the database due to many open connections. To prevent timeout errors with the least change to the application, which solution should the architect implement?
Choose an answer
Tap an option to check your answer.
Correct answer: 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..
Why this is the answer
The correct solution is to use Amazon RDS Proxy. RDS Proxy is a fully managed database proxy that makes applications more resilient to database failures and helps manage database connections more efficiently. It pools and reuses database connections, reducing the load on the Aurora PostgreSQL database caused by a large number of open connections from the Lambda function, which is a common cause of high CPU and memory usage during traffic surges. Modifying the Lambda function to use the RDS Proxy endpoint is a minimal change. Configuring provisioned concurrency for Lambda helps with cold starts but doesn't address database connection limits. A global database or a read replica in a different region wouldn't directly solve the issue of too many open connections overwhelming the primary database instance's CPU and memory. Migrating to DynamoDB is a significant architectural change, not the "least change to the application.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed