nerdexam
Amazon

SAP-C02 · Question #751

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…

The correct answer is B. Create an RDS Proxy endpoint for the database. Store database secrets in AWS Secrets. To minimize Lambda latency and support traffic bursts without significant application changes when connecting to RDS MySQL, implement an RDS Proxy endpoint for efficient connection management.

Submitted by marco_it· Mar 6, 2026Continuous Improvement for Existing Solutions

Question

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?

Options

  • AUpdate the code of the Lambda functions so that the Lambda functions open the database
  • BCreate an RDS Proxy endpoint for the database. Store database secrets in AWS Secrets
  • CCreate a custom parameter group. Increase the value of the max_connections parameter.
  • DCreate an RDS Proxy endpoint for the database. Store database secrets in AWS Secrets

How the community answered

(37 responses)
  • A
    11% (4)
  • B
    84% (31)
  • C
    3% (1)
  • D
    3% (1)

Why each option

To minimize Lambda latency and support traffic bursts without significant application changes when connecting to RDS MySQL, implement an RDS Proxy endpoint for efficient connection management.

AUpdate the code of the Lambda functions so that the Lambda functions open the database

Opening a new database connection for each Lambda invocation is highly inefficient, increases latency, and exacerbates database connection failures under high load.

BCreate an RDS Proxy endpoint for the database. Store database secrets in AWS SecretsCorrect

Creating an RDS Proxy endpoint for the Amazon RDS for MySQL database will efficiently pool and manage database connections, allowing AWS Lambda functions to reuse existing connections instead of opening new ones for each invocation. This significantly reduces connection overhead and latency during traffic bursts, preventing database connection failures with minimal changes to the application code, and storing database secrets in AWS Secrets Manager is the recommended secure practice.

CCreate a custom parameter group. Increase the value of the max_connections parameter.

Increasing the `max_connections` parameter on the database only raises the limit for concurrent connections and does not resolve the underlying issue of inefficient connection management or minimize latency for individual Lambda invocations.

DCreate an RDS Proxy endpoint for the database. Store database secrets in AWS Secrets

This option is effectively identical to B in its proposed solution, which is the correct approach for the given problem.

Concept tested: RDS Proxy for serverless database connection management

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

Community Discussion

No community discussion yet for this question.

Full SAP-C02 Practice