Courseiva
Question 378 of 724
Troubleshooting and OptimizationhardMultiple ChoiceObjective-mapped

DVA-C02 Troubleshooting and Optimization Practice Question

A developer is troubleshooting an AWS Lambda function that experiences high latency for the first few invocations after being idle. The function is written in Python and uses a large library (e.g., Pandas). The function connects to an RDS database in a VPC. What is the most effective way to reduce the latency for the first invocation after idle?

⚠ Common exam trap

It's easy for candidates to confuse cold start mitigation strategies like increasing memory or using layers with the only AWS feature that truly eliminates cold starts for idle functions: provisioned concurrency.

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

Enable provisioned concurrency on the function.

Provisioned concurrency keeps a specified number of execution environments initialized and ready to respond immediately, eliminating the cold start latency that occurs after a period of idle time. This is the most direct solution for reducing latency on the first invocation after idle, especially for functions with large libraries like Pandas that take significant time to load.

Answer analysis

Option-by-option breakdown

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

  • Increase the function's memory allocation to 3008 MB.

    Why it's wrong here

    While increasing memory allocation does provide proportional CPU power, which can accelerate the *execution* phase of a Lambda function, it does not inherently prevent or reduce cold start latency. Cold starts are primarily caused by the time required to initialize a new execution environment, download code, and run global initialization logic, which still occurs regardless of the allocated memory. This action would only improve performance during the function's active processing, not during its initial setup.

  • Enable provisioned concurrency on the function.

    Why this is correct

    Provisioned concurrency pre-initializes a specified number of execution environments for a Lambda function, ensuring they are ready to process requests immediately. This effectively eliminates cold start latency for invocations routed to these pre-warmed instances, as the entire initialization phase (including code download, runtime bootstrapping, and `init` code execution) has already completed. It guarantees consistently low latency for critical, latency-sensitive applications by maintaining a pool of ready-to-go containers.

  • Move the large library to a Lambda layer.

    Why it's wrong here

    Moving a large library to a Lambda layer helps in code organization, reduces the primary deployment package size, and facilitates sharing common dependencies across multiple functions. However, during a cold start, the Lambda service still needs to download and extract the layer's contents along with the function's code into the execution environment. This process contributes to the overall initialization time, meaning layers do not inherently reduce cold start latency but rather manage dependencies more efficiently.

  • Replace the RDS database with Amazon DynamoDB.

    Why it's wrong here

    Replacing an RDS database with Amazon DynamoDB changes the backend data store technology and its access patterns. While DynamoDB might offer different performance characteristics for database operations, it has no direct impact on the Lambda function's cold start behavior. Cold starts are related to the Lambda execution environment's initialization process, not the type or performance of the external database it connects to. The time taken to establish a database connection might be part of the function's *execution* time, but not its *initialization* time.

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

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.