AWS Certified Solutions Architect – Professional — Question 736
A solutions architect has developed a web application that uses an Amazon API Gateway Regional endpoint and an AWS Lambda function. The consumers of the web application are all close to the AWS Region where the application will be deployed. The Lambda function only queries an Amazon Aurora MySQL database. The solutions architect has configured the database to have three read replicas.
During testing, the application does not meet performance requirements. Under high load, the application opens a large number of database connections. The solutions architect must improve the application's performance.
Which actions should the solutions architect take to meet these requirements? (Choose two.)
Answer options
- A. Use the cluster endpoint of the Aurora database.
- B. Use RDS Proxy to set up a connection pool to the reader endpoint of the Aurora database.
- C. Use the Lambda Provisioned Concurrency feature.
- D. Move the code for opening the database connection in the Lambda function outside of the event handler.
- E. Change the API Gateway endpoint to an edge-optimized endpoint.
Correct answer: B, D
Explanation
Implementing RDS Proxy (Option B) allows the Lambda functions to share a pool of database connections, preventing connection exhaustion on the Aurora read replicas. Additionally, defining the database connection code outside of the Lambda handler (Option D) ensures that connections are reused across warm execution environments instead of being re-established on every invocation. Other options do not address the connection limits of the database, and edge-optimized endpoints are unnecessary since users are already close to the AWS Region.