DVA-C02 Deployment Practice Question
A company is deploying a new microservice on AWS Lambda that processes high-resolution images and stores results in Amazon S3. The Lambda function currently uses 1024 MB of memory and has a timeout of 2 minutes. During peak load, many invocations are timing out. The function is CPU-bound during image processing. Which change is MOST likely to reduce timeouts without increasing costs unnecessarily?
⚠ Common exam trap
Candidates often assume increasing timeout (Option D) is the simplest fix for timeouts, ignoring that CPU-bound functions need more CPU, not just more time, and that provisioned concurrency (Option B) is mistakenly thought to improve execution speed rather than just reducing cold start latency.
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 function memory to 2048 MB.
Increasing memory from 1024 MB to 2048 MB proportionally increases CPU allocation in AWS Lambda (up to 1.7 GHz per vCPU at 1769 MB). Since the function is CPU-bound, this directly reduces processing time, mitigating timeouts without the cost spike of 3008 MB. The cost increase is linear with memory, so doubling memory doubles cost per invocation, but the reduced duration often offsets this, keeping total cost similar or lower.
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 memory to 3008 MB.
Why it's wrong here
While increasing memory to 3008 MB would provide additional CPU resources, it is often not the most cost-effective solution for performance optimization. AWS Lambda functions receive a full vCPU at 2048 MB, meaning further increases beyond this point offer diminishing returns for CPU-bound tasks. This option incurs significantly higher costs without a proportional gain in execution speed compared to the 2048 MB configuration.
- ✗
Enable provisioned concurrency to reduce cold starts.
Why it's wrong here
Enabling provisioned concurrency is designed to reduce cold start latency by keeping execution environments pre-initialized and ready to process requests instantly. However, it does not impact the actual execution duration of the Lambda function once it has started running. Therefore, while it improves responsiveness for users by eliminating cold starts, it will not address a problem related to the function's inherent processing time or CPU bottleneck.
- ✓
Increase the function memory to 2048 MB.
Why this is correct
AWS Lambda allocates CPU power proportionally to the configured memory setting, making it a direct lever for performance optimization. Increasing the function's memory to 2048 MB provides a full virtual CPU (vCPU) to the execution environment, significantly boosting computational resources. For CPU-bound microservices, this direct increase in processing power will reduce the overall execution time, making it a highly effective and often cost-efficient optimization.
- ✗
Increase the function timeout to 5 minutes.
Why it's wrong here
Increasing the function timeout merely extends the maximum allowable execution duration before AWS Lambda terminates the function. It does not enhance the function's performance, provide additional CPU, or optimize the underlying code in any way. While it might prevent a timeout error, it simply allows a slow function to run longer, potentially increasing billing costs without addressing the root cause of the inefficiency or improving execution speed.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
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 →
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.