Handling Lambda RDS Connection Exhaustion

A company's application consists of AWS Lambda functions that access an Amazon RDS instance. Occasionally, the application load creates an unexpectedly high volume of database connections. The high volume of connections causes the RDS instance to rapidly exhaust its compute resources, leading to downtime for users. A CloudOps Administrator must make the application more resilient to increased load without making modifications to the application code. Which solution will meet these requirements?

  1. Use Amazon ElastiCache (Redis OSS) with Amazon RDS. Point the application to ElastiCache (Redis OSS).
  2. Use Amazon RDS Proxy with Amazon RDS. Point the application to Amazon RDS Proxy. Correct Answer
  3. Create a Lambda function with that invokes an Amazon EventBridge rule to scale the RDS instance based on usage.
  4. Use Amazon ElastiCache (Memcached) with Amazon RDS. Point the application to ElastiCache (Memcached).
Answer Correct answer: B — Point the application to Amazon RDS Proxy to pool connections and prevent RDS exhaustion without code changes.

Community Insight

RDS Proxy pools database connections to prevent Lambda-induced connection exhaustion on RDS, requiring no code changes other than the endpoint configuration.

Amazon RDS Proxy allows AWS Lambda functions to share database connections, preventing connection exhaustion on an Amazon RDS instance. This solution improves resilience without requiring application code modifications.

Choosing ElastiCache (A or D) because it reduces database load, but implementing caching logic strictly requires modifying application code.

Community Discussion (1 comments)

Bad_Mat 👍 1 Selected: B
B. Use Amazon RDS Proxy with Amazon RDS. Point the application to Amazon RDS Proxy

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

Amazon RDS Proxy is specifically designed to manage database connection pooling for serverless applications like AWS Lambda. By sitting between the Lambda functions and the RDS instance, it multiplexes database connections, allowing thousands of concurrent Lambda invocations to share a much smaller number of database connections. This prevents the RDS instance from exhausting its compute resources due to connection overhead, meeting the requirement without modifying the application logic.

Why the Other Options Are Wrong

Options A and D suggest using Amazon ElastiCache (Redis or Memcached). While caching can reduce database load, integrating a caching layer requires significant modifications to the application code to implement cache-aside logic, violating the requirement. Option C suggests scaling the RDS instance based on usage via EventBridge. Scaling up compute does not inherently increase the maximum connection limit efficiently enough to handle sudden Lambda bursts, and scaling takes time, failing to prevent immediate connection exhaustion.

Community Comment Notes

As Bad_Mat noted, the correct approach is to "Use Amazon RDS Proxy with Amazon RDS" because it directly addresses the connection pooling need for Lambda without code changes.

Official Reference

Exam Strategy

When a question involves Lambda functions overwhelming a database with connections and forbids code changes, immediately look for Amazon RDS Proxy. It is the AWS-native solution for connection pooling and multiplexing for serverless compute.

Related Analysis

Practice All SOA-C03 Questions

Access 100 questions with complete answers and detailed explanations.

View Full SOA-C03 Practice Test →

← Back to SOA-C03 Study Guide