Courseiva
Development with AWS ServicesmediumMultiple ChoiceObjective-mapped

DVA-C02 Development with AWS Services Practice Question

A developer is using Amazon API Gateway to expose a Lambda function as a REST API. The Lambda function queries an Amazon RDS database. Under heavy load, the database connection pool is exhausted, causing errors. What is the BEST way to manage database connections in this serverless architecture?

⚠ Common exam trap

Watch out — candidates often confuse connection pooling with caching (ElastiCache) or assume scaling Lambda concurrency will solve the issue, when in fact it exacerbates the connection exhaustion problem.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Use Amazon RDS Proxy to pool and share database connections.

Amazon RDS Proxy sits between Lambda and RDS, managing a pool of database connections that can be reused across multiple concurrent Lambda invocations. This prevents connection exhaustion under heavy load without requiring code changes, as the proxy handles connection multiplexing and keeps idle connections warm.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Migrate the database to Amazon DynamoDB.

    Why it's wrong here

    Migrating the database to Amazon DynamoDB would involve a complete re-architecture of the application to use a NoSQL database, which is a different database paradigm entirely. This drastic change does not address the specific problem of connection pooling for an existing Amazon RDS relational database. DynamoDB operates on a different connection model and would not solve the connection exhaustion issue for the current RDS setup.

  • Increase the concurrency limit of the Lambda function.

    Why it's wrong here

    Increasing the concurrency limit of the Lambda function would exacerbate the connection pooling problem rather than solve it. Each concurrent Lambda invocation typically attempts to establish a new database connection to Amazon RDS. A higher concurrency limit would lead to more simultaneous connection attempts, quickly exhausting the finite connection limit of the RDS instance and worsening performance bottlenecks.

  • Use Amazon RDS Proxy to pool and share database connections.

    Why this is correct

    Amazon RDS Proxy is specifically designed to manage and pool database connections for Amazon RDS. It acts as an intermediary, maintaining a pool of established connections to the RDS database and reusing them across multiple Lambda function invocations. This significantly reduces the overhead of opening and closing connections, preventing connection exhaustion and improving application scalability and responsiveness.

  • Use Amazon ElastiCache to cache database connections.

    Why it's wrong here

    Amazon ElastiCache is an in-memory caching service primarily used for caching application data to reduce database load and improve read performance. It is not designed to cache or pool database *connections* themselves. ElastiCache would store query results or frequently accessed data, but it does not provide any mechanism for managing the lifecycle or sharing of persistent connections to a relational database like RDS.

Quick reference

Cloud Service Model Comparison

ModelYou ManageProvider ManagesExamples
IaaSOS, runtime, apps, dataHardware, hypervisor, networkingEC2, Azure VMs, GCP Compute Engine
PaaSApps and dataOS, runtime, middleware, hardwareElastic Beanstalk, Azure App Service
SaaSData and settings onlyEverything elseMicrosoft 365, Salesforce, Workday
FaaS / ServerlessFunction code onlyInfra, scaling, runtimeLambda, Azure Functions, Cloud Run
CaaSContainers and appsKubernetes, OS, hardwareEKS, AKS, GKE

About these practice questions

This DVA-C02 question is part of Courseiva's 724-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DVA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DVA-C02 exam.