SAP-C02 · Question #295
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…
The correct answer is B. Use RDS Proxy to set up a connection pool to the reader endpoint of the Aurora database. D. Move the code for opening the database connection in the Lambda function outside of the event. Connect to RDS outside of Lambda handler method to improve performance https://awstut.com/en/2022/04/30/connect-to-rds-outside-of-lambda-handler-method-to-improve- Using RDS Proxy, you can handle unpredictable surges in database traffic. Otherwise, these surges might cause…
Question
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.)
Options
- AUse the cluster endpoint of the Aurora database.
- BUse RDS Proxy to set up a connection pool to the reader endpoint of the Aurora database.
- CUse the Lambda Provisioned Concurrency feature.
- DMove the code for opening the database connection in the Lambda function outside of the event
- EChange the API Gateway endpoint to an edge-optimized endpoint.
How the community answered
(17 responses)- A12% (2)
- B82% (14)
- E6% (1)
Explanation
Connect to RDS outside of Lambda handler method to improve performance https://awstut.com/en/2022/04/30/connect-to-rds-outside-of-lambda-handler-method-to-improve- Using RDS Proxy, you can handle unpredictable surges in database traffic. Otherwise, these surges might cause issues due to oversubscribing connections or creating new connections at a fast rate. RDS Proxy establishes a database connection pool and reuses connections in this pool. This approach avoids the memory and CPU overhead of opening a new database connection each time. To protect the database against oversubscription, you can control the number of database connections that are created. https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-proxy.html
Community Discussion
No community discussion yet for this question.