Courseiva
Design for New SolutionshardMultiple SelectObjective-mapped

SAP-C02 Design for New Solutions Practice Question

A company is designing a new serverless application using AWS Lambda. The function needs to access an Amazon RDS database. Which THREE practices should be followed to avoid connection exhaustion?

⚠ Common exam trap

Watch out — candidates often assume storing a connection in a global variable is sufficient to reuse it across invocations, but they overlook that concurrent invocations run in separate execution environments, each with its own global scope, leading to multiple connections and potential exhaustion.

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 connections

Amazon RDS Proxy sits between Lambda and the database, managing a pool of established connections. It reduces the overhead of opening and closing connections per invocation and prevents Lambda from exhausting database connections during concurrent executions. This is the recommended pattern for serverless applications with relational databases.

Answer analysis

Option-by-option breakdown

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

  • Store the database connection in a global variable to reuse across invocations

    Why it's wrong here

    Lambda instances are recycled; global variables are not shared across invocations.

  • Assign a static IP address to the Lambda function

    Why it's wrong here

    Static IP does not affect connection exhaustion.

  • Use Amazon RDS Proxy to pool connections

    Why this is correct

    RDS Proxy manages connection pooling for Lambda.

  • Open the database connection only when needed and close it after each invocation

    Why this is correct

    Minimizes open connections.

  • Increase the maximum number of database connections in the RDS parameter group

    Why this is correct

    Allows more concurrent connections.

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 SAP-C02 question is part of Courseiva's 1,660-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 SAP-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 SAP-C02 exam.