DVA-C02 Development with AWS Services Practice Question
A company uses Amazon API Gateway to expose a REST API backed by AWS Lambda. The API is experiencing high latency. The developer suspects cold starts are contributing to the latency. Which action would be MOST effective in reducing cold start latency?
⚠ Common exam trap
It's easy for candidates to confuse increasing timeout with improving performance, but timeout only affects how long a function can run, not how quickly it starts.
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
✓
Increase the memory allocation of the Lambda function.
Increasing the memory allocation of a Lambda function directly correlates to allocating more CPU power, which reduces the initialization time during a cold start. AWS Lambda provisions CPU proportionally to the configured memory, so a higher memory setting speeds up the runtime environment setup and code loading, thereby lowering cold start latency.
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 memory allocation of the Lambda function.
Why this is correct
Increasing the memory allocation for a Lambda function directly correlates with an increase in allocated CPU power. AWS Lambda provisions CPU cycles proportionally to the memory configured for the function. More CPU resources allow the function's execution environment to initialize faster, load dependencies more quickly, and execute the handler code more efficiently during a cold start, thereby reducing the overall latency experienced by the user.
- ✗
Place the Lambda function in a VPC to improve network latency.
Why it's wrong here
Placing a Lambda function within a Virtual Private Cloud (VPC) requires the creation and attachment of an Elastic Network Interface (ENI) for each new execution environment. This ENI provisioning process introduces significant overhead during a cold start, directly increasing the initialization time before the function code can even begin executing. While necessary for accessing private resources, it generally *increases* cold start latency rather than improving network latency for external API calls.
- ✗
Enable Lambda@Edge to cache responses.
Why it's wrong here
Lambda@Edge is a specialized AWS service designed to run Lambda functions at CloudFront edge locations, primarily for customizing content delivered via a CDN. Its purpose is to modify requests/responses at the edge or cache content closer to users, not to mitigate cold starts for standard backend Lambda functions invoked by API Gateway. Enabling Lambda@Edge would not impact the cold start performance of the primary API backend Lambda function.
- ✗
Increase the function timeout to 15 minutes.
Why it's wrong here
The function timeout setting in AWS Lambda specifies the maximum duration a function is permitted to execute before AWS forcibly terminates it. Modifying this value only affects how long a function can run once it has successfully started. It has absolutely no influence on the initial provisioning time or the time taken for the execution environment to become ready during a cold start, which occurs *before* the function's execution begins.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
About these practice questions
Courseiva writes every DVA-C02 question from scratch — 724 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
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.