nerdexam
Amazon

SAP-C02 · Question #785

A company runs a serverless ecommerce application on AWS. The application uses API Gateway to invoke Java Lambda functions that connect to an Amazon RDS for MySQL database. During a sale event…

The correct answer is B. Use RDS Proxy. Store DB credentials in Secrets Manager. Update Lambda to use RDS Proxy. The serverless application experiences slow performance and DB connection failures during traffic spikes due to Lambda functions overwhelming the RDS database.

Submitted by noor.lb· Mar 6, 2026Continuous Improvement for Existing Solutions

Question

A company runs a serverless ecommerce application on AWS. The application uses API Gateway to invoke Java Lambda functions that connect to an Amazon RDS for MySQL database. During a sale event, traffic spikes caused slow performance and DB connection failures. Which solution will improve performance with the LEAST application change?

Options

  • AMove DB connection outside Lambda handler and increase provisioned concurrency.
  • BUse RDS Proxy. Store DB credentials in Secrets Manager. Update Lambda to use RDS Proxy.
  • CIncrease max_connections parameter in a custom DB parameter group and reboot. Increase
  • DUse RDS Proxy and Secrets Manager. Increase reserved concurrency.

How the community answered

(47 responses)
  • A
    6% (3)
  • B
    77% (36)
  • C
    4% (2)
  • D
    13% (6)

Why each option

The serverless application experiences slow performance and DB connection failures during traffic spikes due to Lambda functions overwhelming the RDS database.

AMove DB connection outside Lambda handler and increase provisioned concurrency.

While moving DB connection initialization outside the handler is good practice, it doesn't solve the core issue of the database being overwhelmed by too many connections, and provisioned concurrency doesn't directly address DB connection limits.

BUse RDS Proxy. Store DB credentials in Secrets Manager. Update Lambda to use RDS Proxy.Correct

Amazon RDS Proxy manages database connection pooling, effectively multiplexing a large number of Lambda connections to a smaller, fixed set of database connections, preventing the database from being overwhelmed. Storing credentials in Secrets Manager securely integrates with RDS Proxy, minimizing application code changes to point to the proxy endpoint.

CIncrease max_connections parameter in a custom DB parameter group and reboot. Increase

Increasing `max_connections` directly on the database might temporarily mitigate failures but can strain database resources, potentially degrading performance, and requires a reboot causing downtime.

DUse RDS Proxy and Secrets Manager. Increase reserved concurrency.

Increasing reserved concurrency limits the maximum number of concurrent Lambda executions, which can prevent overwhelming the database but does not improve database connection management efficiency like RDS Proxy.

Concept tested: RDS Proxy for Lambda database connectivity

Source: https://aws.amazon.com/rds/proxy/

Community Discussion

No community discussion yet for this question.

Full SAP-C02 Practice