Add RDS Proxy and provisioned concurrency to bursty serverless Lambda functions

Answer Correct answer: B — Create an RDS Proxy endpoint, keep credentials in Secrets Manager, point the functions at the proxy, and raise provisioned concurrency.

A company is running a serverless ecommerce application on AWS. The application uses Amazon API Gateway to invoke AWS Lambda Java functions. The Lambda functions connect to an Amazon RDS for MySQL database to store data. During a recent sale event, a sudden increase in web traffic resulted in poor API performance and database connection failures. The company needs to implement a solution to minimize the latency for the Lambda functions and to support bursts in traffic. Which solution will meet these requirements with the LEAST amount of change to the application?

  1. Update the code of the Lambda functions so that the Lambda functions open the database connection outside of the function handler. Increase the provisioned concurrency for the Lambda functions.
  2. Create an RDS Proxy endpoint for the database. Store database secrets in AWS Secrets Manager. Set up the required IAM permissions. Update the Lambda functions to connect to the RDS Proxy endpoint. Increase the provisioned concurrency for the Lambda functions. Correct Answer
  3. Create a custom parameter group. Increase the value of the max_connections parameter. Associate the custom parameter group with the RDS DB instance and schedule a reboot. Increase the reserved concurrency for the Lambda functions.
  4. Create an RDS Proxy endpoint for the database. Store database secrets in AWS Secrets Manager. Set up the required IAM permissions. Update the Lambda functions to connect to the RDS Proxy endpoint. Increase the reserved concurrency for the Lambda functions.

Community Votes

B
78%
D
22%

78% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

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.

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.

Community Discussion (11 comments)

ebbff63 👍 6
Provisioned 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 Selected: B
If 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.
TomTom 👍 1 Selected: A
Option 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 👍 1
B 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.
0b43291 👍 1 Selected: B
By 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.
JoeTromundo 👍 3 Selected: B
Connection 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.
vip2 👍 4 Selected: B
B is correct for least operation(not cost effectively) in question
Helpnosense 👍 2 Selected: A
A 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.
ebbff63 👍 1 Selected: B
Answer B
Alagong 👍 4 Selected: D
Option 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.
zapper1234 👍 1
Sorry, meant A

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

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

Related Analysis

Practice All SAP-C02 Questions

Access 85 questions with complete answers and detailed explanations.

View Full SAP-C02 Practice Test →

← Back to SAP-C02 Study Guide