DVA-C02 Development with AWS Services Practice Question
A company is using AWS Lambda with a 1 GB memory configuration. The function processes large CSV files from S3 and occasionally times out after 15 seconds. The function currently uses synchronous invocation. What is the MOST cost-effective solution to handle larger files without losing data?
⚠ Common exam trap
Many exam-takers assume asynchronous invocation has a longer timeout than synchronous, but both share the same 15-minute maximum; the real differentiator is that asynchronous invocation allows retries and queueing, not extended execution time.
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 Lambda timeout to 15 minutes and keep memory at 1 GB.
Increasing the Lambda timeout from 15 seconds to 15 minutes directly addresses the timeout issue without incurring additional costs. Keeping memory at 1 GB avoids the higher per-GB-second cost of larger memory configurations, making it the most cost-effective solution. Lambda charges based on memory allocation and execution duration, so extending the timeout alone does not increase the cost per invocation if the function runs for the same duration.
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 Lambda timeout to 15 minutes and keep memory at 1 GB.
Why this is correct
Increasing the Lambda timeout to its maximum of 15 minutes directly addresses the problem if the function simply requires more execution time to complete its task. This is often the most cost-effective solution for tasks that are not CPU-bound but rather time-consuming due to sequential operations or external dependencies, as it avoids increasing compute resources unnecessarily. Keeping memory at 1 GB ensures that billing remains efficient by only paying for the additional execution duration, not for unused processing power.
- ✗
Switch to asynchronous Lambda invocation to allow up to 15 minutes of processing.
Why it's wrong here
Switching to asynchronous Lambda invocation, while also supporting a 15-minute timeout, introduces unnecessary architectural changes and does not inherently resolve the core issue of a long-running task. Asynchronous invocations require different error handling mechanisms, such as Dead-Letter Queues (DLQs) or destination configurations, and change the invocation pattern from direct response to event-driven processing. This approach adds complexity without directly optimizing the function's execution time, making it an over-engineered solution if the primary problem is just execution duration.
- ✗
Increase the Lambda memory to 3 GB to improve processing speed.
Why it's wrong here
Increasing Lambda memory to 3 GB would proportionally increase the allocated CPU power, which could speed up CPU-bound tasks. However, this approach significantly increases the cost of execution, as Lambda billing is directly tied to both memory and duration. If the function's bottleneck is I/O-bound, such as waiting for network requests or database operations, increasing memory will not improve performance and would result in paying more for idle compute resources, making it an inefficient solution.
- ✗
Use AWS Step Functions to orchestrate the processing in smaller chunks.
Why it's wrong here
Using AWS Step Functions to orchestrate processing in smaller chunks is a robust solution for complex, long-running, and stateful workflows, but it introduces significant overhead for a simple timeout issue. Step Functions add development complexity, operational management, and additional costs for state transitions and task executions. For a single Lambda function that merely needs more time to complete, extending the timeout is a far simpler and more cost-effective approach than building a multi-step workflow.
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
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.