nerdexam
Amazon

DVA-C02 · Question #81

A company has a critical application on AWS. The application exposes an HTTP API by using Amazon API Gateway. The API is integrated with an AWS Lambda function. The application stores data in an Amazo

The correct answer is B. Use Amazon RDS Proxy to create a proxy that connects to the DB instance. Update the Lambda. AWS Lambda can exhaust RDS connection limits during concurrency spikes because each Lambda execution opens its own connection. Amazon RDS Proxy pools and reuses database connections, eliminating the 'too many connections' error.

Submitted by andres_qro· Mar 5, 2026Troubleshooting and Optimization

Question

A company has a critical application on AWS. The application exposes an HTTP API by using Amazon API Gateway. The API is integrated with an AWS Lambda function. The application stores data in an Amazon RDS for MySQL DB instance with 2 virtual CPUs (vCPUs) and 64 GB of RAM. Customers have reported that some of the API calls return HTTP 500 Internal Server Error responses. Amazon CloudWatch Logs shows errors for "too many connections." The errors occur during peak usage times that are unpredictable. The company needs to make the application resilient. The database cannot be down outside of scheduled maintenance hours. Which solution will meet these requirements?

Options

  • ADecrease the number of vCPUs for the DB instance. Increase the max_connections setting.
  • BUse Amazon RDS Proxy to create a proxy that connects to the DB instance. Update the Lambda
  • CAdd a CloudWatch alarm that changes the DB instance class when the number of connections
  • DAdd an Amazon EventBridge rule that increases the max_connections setting of the DB instance

How the community answered

(34 responses)
  • A
    6% (2)
  • B
    62% (21)
  • C
    9% (3)
  • D
    24% (8)

Why each option

AWS Lambda can exhaust RDS connection limits during concurrency spikes because each Lambda execution opens its own connection. Amazon RDS Proxy pools and reuses database connections, eliminating the 'too many connections' error.

ADecrease the number of vCPUs for the DB instance. Increase the max_connections setting.

Decreasing vCPUs reduces compute capacity and does not increase the connection limit; max_connections is tied to instance memory, and reducing resources would worsen performance under peak load.

BUse Amazon RDS Proxy to create a proxy that connects to the DB instance. Update the LambdaCorrect

Amazon RDS Proxy sits between Lambda functions and the RDS instance, maintaining a warm pool of database connections and multiplexing many Lambda invocations over a smaller set of actual DB connections. This resolves the 'too many connections' error without requiring downtime or instance resizing, meeting the resilience and availability requirements.

CAdd a CloudWatch alarm that changes the DB instance class when the number of connections

A CloudWatch alarm that changes the DB instance class causes a brief outage during instance modification, violating the requirement that the database cannot be down outside scheduled maintenance.

DAdd an Amazon EventBridge rule that increases the max_connections setting of the DB instance

EventBridge cannot dynamically modify the max_connections parameter at runtime; that parameter is set via a DB parameter group and requires a reboot to take effect on most RDS instance classes.

Concept tested: Amazon RDS Proxy connection pooling for Lambda

Source: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-proxy.html

Community Discussion

No community discussion yet for this question.

Full DVA-C02 Practice