Question 486 of 724
DVA-C02 Troubleshooting and Optimization Practice Question
A developer is troubleshooting an AWS Lambda function that is triggered by an S3 event. The function occasionally fails with a timeout error. CloudWatch logs show that the timeout occurs during the processing of large files. The function has a memory setting of 128 MB and a timeout of 3 seconds. The developer wants to process large files without modifying the code. Which parameter should the developer adjust first?
⚠ Common exam trap
Watch out — candidates often assume a timeout error must be fixed by increasing the timeout, but the question explicitly states the timeout occurs during processing of large files, indicating a performance bottleneck that memory (and thus CPU) increase can resolve without code changes.
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's memory
Increasing the function's memory is the correct first step because Lambda allocates CPU proportionally to memory, and more CPU reduces processing time for CPU-bound tasks like decompressing or parsing large files. This directly addresses the timeout by making the function complete faster, without requiring code changes. The current 128 MB setting is the minimum, which provides the least CPU, so even a modest increase can significantly reduce execution time.
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
Why this is correct
In AWS Lambda, memory allocation directly correlates with the amount of CPU power provisioned to the function. Increasing the function's memory provides more vCPUs, which can significantly speed up compute-intensive operations and data processing within the function's execution environment. This optimization can reduce the overall execution duration, thereby preventing timeouts and improving performance without requiring any changes to the underlying application code. It's often the first and most effective step for resolving performance bottlenecks.
- ✗
Increase the function's timeout
Why it's wrong here
While increasing the function's timeout would prevent the specific timeout error, it merely extends the maximum allowed execution duration rather than addressing the root cause of the function's slowness. This approach can lead to higher costs due to longer billing durations and doesn't improve the actual efficiency or speed of the function's processing. It is generally recommended to optimize the function's performance first, for instance by increasing memory, before resorting to extending the timeout.
- ✗
Increase the function's reserved concurrency
Why it's wrong here
Increasing a Lambda function's reserved concurrency allocates a dedicated pool of execution environments, preventing other functions from consuming them and ensuring the function can scale to a specific number of simultaneous invocations. However, reserved concurrency does not influence the execution time or performance of a single invocation. It manages the maximum number of parallel executions, not the speed at which each individual execution completes, making it irrelevant for a function that is timing out due to slow processing.
- ✗
Increase the S3 event notification batch size
Why it's wrong here
S3 event notifications operate on a one-to-one basis, meaning each individual object creation, deletion, or modification event triggers a separate Lambda function invocation. Unlike some other event sources like SQS or Kinesis, S3 event notifications do not support or have a configurable batch size parameter for grouping multiple events into a single Lambda invocation. Therefore, attempting to increase a non-existent batch size would have no effect on the function's behavior or performance.
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 |
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 →
Last reviewed: Jun 11, 2026
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.
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.
Sign in to join the discussion.