A serverless city permit API uses many concurrent AWS Lambda functions that open short-lived connections to Amazon RDS. During renewal season the database hits max_connections and new Lambdas fail. What should the solutions architect introduce to stabilize connection churn?
Select an answer to reveal the explanation.
Short Explanation
Lambdas are like hundreds of clerks opening a new phone line to the same records clerk every few seconds—the switchboard melts. RDS Proxy is the shared switchboard that keeps a polite pool of open lines for everyone.
Full Explanation
During renewal season, a serverless city permit API can fan out hundreds of concurrent AWS Lambda invocations, each opening short-lived connections to Amazon RDS. Relational engines expose a finite max_connections budget; when every clerk-like Lambda dials the records desk independently, the database refuses new sessions and citizen renewals fail. Amazon RDS Proxy sits between Lambda and RDS as a connection pool and multiplexer: Lambdas authenticate to the proxy, and the proxy maintains a controlled pool of reused database connections. That pattern absorbs connection churn without requiring one RDS connection per concurrent invoke, stabilizing the municipal API when seasonal concurrency spikes.
Giving every Lambda its own dedicated RDS instance is operationally and financially absurd for a county-scale API—it multiplies engines instead of pooling clients and still leaves each instance with its own connection limits. Disabling Lambda concurrency so only one function talks to RDS “solves” connection storms by destroying the elasticity that made serverless attractive for renewal peaks; the desk stays open for one clerk while the line of citizens grows. Switching the API to Amazon S3 static website hosting removes the database entirely and cannot process dynamic permit renewals, payments, or authorization—static hosting is not an application-tier substitute.
Exam caveat: RDS Proxy helps connection management and failover-friendly pooling; it does not automatically fix slow queries, missing indexes, or undersized instances. Also remember that proxy support and features vary by engine; the exam expects the pooling concept for Lambda-to-RDS storms, not a claim that Proxy replaces query tuning.
Operational check: during a renewal-season load test, compare max_connections errors and Lambda timeouts with and without the proxy; verify the proxy target group points at the correct RDS endpoint, IAM/Secrets Manager credentials rotate cleanly, and CloudWatch metrics show borrowed connections staying within the pool rather than exhausting the database’s connection ceiling.