Add RDS Proxy and provisioned concurrency to bursty serverless Lambda functions
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?
Community Votes
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)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
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 →