Add RDS Proxy and provisioned concurrency to bursty serverless Lambda functions
Short answer
B Create an RDS Proxy endpoint, keep credentials in Secrets Manager, point the functions at the proxy, and raise provisioned concurrency.
Question
Key Takeaways
RDS Proxy removes connection setup overhead and connection storms during bursts, and provisioned concurrency keeps a set of execution environments initialized so invocation latency does not spike when traffic arrives.
A serverless ecommerce application runs Java Lambda functions behind API Gateway that connect to RDS for MySQL. A sale event produced poor API performance and database connection failures, and the fix must minimize latency and absorb traffic bursts with minimal application change.
Common mistake: Confusing provisioned concurrency with reserved concurrency. Reserved concurrency caps and throttles simultaneous executions, which is a guardrail rather than a latency fix, so a reserved concurrency increase in option C does nothing to reduce cold start latency during a burst.
Expert Analysis
Why the Answer Is Correct
RDS Proxy sits between the Lambda functions and RDS for MySQL and reuses connections from a managed pool, which removes per-invocation connection setup cost and prevents the connection failures seen during the sale. Storing the database credentials in AWS Secrets Manager with the appropriate IAM permissions means the proxy retrieves and rotates credentials without hardcoding them in the code. Increasing provisioned concurrency keeps execution environments initialized so that the extra invocations from a burst do not pay cold start latency. Pointing the functions at the proxy endpoint is a small, localized code change.
Why the Other Options Are Wrong
A: Opening the connection outside the handler is an unreliable pattern, because a warm container reuses global state unpredictably across concurrent execution environments, and increasing provisioned concurrency alone does not stop the connection failures. C: Raising max_connections and rebooting is a disruptive change to the database that still leaves connection setup cost in the request path, and reserved concurrency limits rather than accelerates invocations. D: The construction is right but it specifies reserved concurrency, which throttles concurrency rather than pre-warming environments, so it fails the latency requirement.
Community Comment Notes
The community voted 67 to 19 for B over D. The distinction that decided it is that provisioned concurrency pre-initializes environments to reduce latency while reserved concurrency throttles and caps simultaneous executions, and one commenter noted that reserved concurrency would be the choice only if cost were the primary concern.
Official Reference
https://docs.aws.amazon.com/lambda/latest/dg/configuration-rdsproxy.html
This link opens the official vendor documentation in a new tab.
Community Votes
78% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 11 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 11
-
ebbff63 👍 6Provisioned Concurrency - makes sure Lambda functions could handle traffic bursts RDS proxy endpoint - intelligently manages connections to a relational database ( Amazon RDS here) So, the answer - B
-
mifune 👍 5 Answered BIf cost is a primary concern, Reserved Concurrency could be a more economical choice. Provisioned Concurrency is designed to provide more control over your Lambda function’s performance and scalability. Answer is B.
-
Alagong 👍 4 Answered DOption D with "reserved concurrency" can be more cost-effective and flexible for handling sudden traffic bursts, as it ensures a minimum number of instances without the potential over-provisioning of provisioned concurrency.
-
vip2 👍 4 Answered BB is correct for least operation(not cost effectively) in question
-
JoeTromundo 👍 3 Answered BConnection Pooling: RDS Proxy helps manage database connections efficiently by pooling and reusing connections. Reduced Latency: By reducing the overhead of establishing new connections for each Lambda invocation, RDS Proxy improves the overall performance, minimizing the latency experienced by your application during traffic bursts. Provisioned Concurrency: Increasing the provisioned concurrency for the Lambda functions ensures they are always ready to handle spikes in traffic, reducing cold start times. Seamless Integration: The integration with AWS Lambda and Secrets Manager ensures that the database credentials are securely managed. IAM Permissions: The use of AWS Identity and Access Management (IAM) permissions to control access to the proxy ensures security and compliance, making this solution secure and scalable.
Show 6 more comments
-
Helpnosense 👍 2 Answered AA is right answer. D is wrong because the provisioned Concurrency is the term to keep pre-allocated warm instances of lambda not reserved concurrency. B missing auto scaling the db.
-
0b43291 👍 1 Answered BBy leveraging RDS Proxy, AWS Secrets Manager, and increasing provisioned concurrency, Option B provides a scalable and secure solution with minimal changes to the application code, making it the most appropriate choice for meeting the requirements. The other options have drawbacks or require more significant changes to the application: Option A: While it suggests increasing provisioned concurrency, opening database connections outside the function handler may not be a best practice and could lead to connection leaks or other issues. Option C: Increasing the max_connections parameter on the RDS instance may not be sufficient to handle bursts in traffic and could potentially impact performance. Additionally, it requires scheduling a reboot, which could cause downtime. Option D: While it correctly suggests using RDS Proxy, AWS Secrets Manager, and increasing reserved concurrency, it does not mention provisioned concurrency, which is more suitable for handling bursts in traffic.
-
TomTom 👍 1 Answered AOption A is likely the best choice. It involves a straightforward adjustment to how database connections are handled without introducing new services or significantly altering existing infrastructure. While it still requires some code changes, these are limited compared to Options B, C, and D. In summary, while using AWS Secrets Manager (as in Options B and D) provides security benefits, it also introduces more complexity and significant changes to your existing setup. Therefore, if minimizing changes is your primary goal, Option A (updating the Lambda function code for connection handling) is the most suitable choice.
-
AzureDP900 👍 1B is correct This solution requires minimal changes to the application: • Creating an RDS Proxy endpoint and updating the Lambda functions to use it is a relatively minor modification. • Store database secrets in AWS Secrets Manager adds some complexity, but it is still a manageable change. • Increasing provisioned concurrency for the Lambda functions can help handle bursts in traffic without requiring significant changes to the application.
-
zapper1234 👍 1Sorry, meant A
-
ebbff63 👍 1 Answered BAnswer B
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 →