Front Aurora replicas with an RDS Proxy read-only endpoint for Lambda
A company has an application that uses an Amazon Aurora PostgreSQL DB cluster for the application's database. The DB cluster contains one small primary instance and three larger replica instances. The application runs on an AWS Lambda function. The application makes many short-lived connections to the database's replica instances to perform read-only operations. During periods of high traffic, the application becomes unreliable and the database reports that too many connections are being established. The frequency of high-traffic periods is unpredictable. Which solution will improve the reliability of the application?
Community Votes
100% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
RDS Proxy multiplexes many short-lived client connections over a small pool of database connections, and configuring a read-only endpoint on the proxy sends the function's reads to the replicas behind a single endpoint, so the connection count on the database stops scaling with concurrency.
An Aurora PostgreSQL cluster has one small primary and three larger replicas, and a Lambda function makes many short-lived read-only connections to the replicas. Under unpredictable traffic spikes the application becomes unreliable and the database reports too many connections.
Increasing max_connections in the parameter group. That permits more simultaneous connections but every connection still consumes database memory and CPU on the instance, so the instance is pushed further toward resource exhaustion rather than relieved, and it requires a reboot of every instance in the cluster.
Community Discussion (7 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
The root problem is that a bursty serverless caller opens and closes a large number of short-lived connections, and each one consumes a connection slot and server resources. RDS Proxy accepts all of those client connections and multiplexes them onto a small managed pool of actual database connections, so the database sees a bounded connection count no matter how many concurrent Lambda executions there are. Configuring a read-only endpoint on the proxy directs the function's read-only operations to the Aurora replicas behind a single endpoint, which also uses the read capacity that is already provisioned. Because the traffic is unpredictable rather than steady, the proxy absorbs the bursts without any capacity pre-provisioning.Why the Other Options Are Wrong
B: Raising max_connections and rebooting the cluster permits more connections but each additional connection still consumes memory and CPU on the instance, so under a burst the instance becomes more likely to exhaust resources, and the reboot is disruptive. C: Instance scaling on the DatabaseConnections metric would add reader instances, but it reacts after connections are already elevated, requires time to scale, and the function would still be opening a connection per execution, so the connection storm itself is unchanged. D: The Aurora Data API is a separate data plane for the Aurora Serverless data API, and a read-only endpoint is not configured on the RDS proxy in that way, so the option does not describe a valid proxy configuration.Community Comment Notes
The community voted 100 to 0 for A, and the most-liked comment laid out the path explicitly as Lambda to RDS Proxy to the Aurora replica read-only endpoint, referencing the AWS blog on using Amazon RDS Proxy with AWS Lambda and the announcement of read-only endpoints for RDS Proxy.Official Reference
Related Analysis
Practice All SAP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full SAP-C02 Practice Test →