Front Aurora replicas with an RDS Proxy read-only endpoint for Lambda
Short answer
A Create an RDS Proxy with a read-only endpoint for the Aurora cluster and point the Lambda function at the proxy.
Question
Key Takeaways
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.
Common mistake: 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.
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
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-replicas.html
This link opens the official vendor documentation in a new tab.
Community Votes
100% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 7 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 7
-
kejam 👍 16 Answered Alambda -> rds-proxy -> aurora replica(s) read-only endpoint https://aws.amazon.com/blogs/compute/using-amazon-rds-proxy-with-aws-lambda/ https://aws.amazon.com/about-aws/whats-new/2021/03/amazon-rds-proxy-adds-read-only-endpoints-for-amazon-aurora-replicas/ RDS Data API is used with Aurora Serverless https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html#data-api.limitations
-
0b43291 👍 2 Answered AThe other options have limitations or do not address the root cause of the issue: Option B (Increasing max_connections): While increasing the maximum number of connections allowed on the DB cluster may provide a temporary solution, it does not address the underlying issue of inefficient connection management, and it may lead to increased resource consumption and potential performance degradation. Option C (Instance scaling): While instance scaling can help increase the overall capacity of the DB cluster, it does not directly address the issue of too many connections being established. Additionally, it may not be effective if the high-traffic periods are unpredictable and short-lived. Option D (RDS Proxy with Aurora Data API): The Aurora Data API is designed for serverless applications to interact with Aurora Serverless databases using a web services model, not for traditional database connections. It does not address the issue of connection management for the existing application architecture.
-
duriselvan 👍 2A is ans lambda -> rds-proxy -> aurora replica(s) read-only endpoint
-
AzureDP900 👍 1Option A allows the application to connect to the replica instances without directly accessing them. This approach helps to: 1) Reduce the number of connections to the primary instance 2) Increase performance by offloading read operations to the replica instances 3) Improve reliability by reducing the load on the primary instance during periods of high traffic
-
alexis123456 👍 4correct Answer is A
Show 2 more comments
-
master9 👍 1 Answered Ards-proxy
-
career360guru 👍 1 Answered AOption A
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All SAP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full SAP-C02 Practice Test →