DVA-C02 Development with AWS Services Practice Question
A developer is troubleshooting a Lambda function that times out when processing large files from Amazon S3. The function is configured with a 3-minute timeout and 128 MB memory. Which TWO actions would MOST likely resolve the issue? (Choose TWO.)
⚠ Common exam trap
The trap is that candidates may incorrectly assume S3 multipart upload speeds up reading from S3, when it is only for uploading. A common mistake is to overlook increasing timeout as a valid fix, but in the AWS Developer Associate exam, both memory increase and timeout increase are standard solutions for Lambda timeouts.
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 for the Lambda function.
Increasing the memory allocation for a Lambda function also increases CPU and network bandwidth, which can significantly speed up the processing of large files, helping the function complete within the timeout. Option E is correct because increasing the Lambda function timeout directly addresses the timeout issue, giving the function more time to complete processing large files. Option A is incorrect because S3 multipart upload is used for uploading large objects to S3, not for downloading/reading from S3; it does not improve data ingestion into a Lambda function. Option C is incorrect because sending events to SQS does not affect the processing speed of a single large file; it only decouples the event source. Option D is too generic; while a more efficient algorithm could help, it is not a guaranteed or most likely fix compared to increasing memory or timeout.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use S3 multipart upload for large files to improve throughput.
Why it's wrong here
S3 multipart upload is designed for uploading large objects to S3, not for reading/downloading from S3. It does not improve the speed at which Lambda reads the file from S3, so it will not resolve the timeout issue.
- ✓
Increase the memory allocation for the Lambda function.
Why this is correct
In AWS Lambda, memory allocation is directly correlated with the CPU power and network bandwidth provisioned for the function's execution environment. For processing large files, increasing memory provides more RAM for data buffering and in-memory operations, while the increased CPU and network throughput accelerate data retrieval from S3 and subsequent computational tasks. This combined performance boost can significantly reduce the overall execution time, helping the function complete within its timeout.
- ✗
Change the S3 event notification to send messages to an Amazon SQS queue instead.
Why it's wrong here
Changing S3 event notifications to send messages to an Amazon SQS queue decouples the event source from the Lambda invocation, offering benefits like message persistence, retries, and asynchronous processing. However, this architectural change does not alter the fundamental execution characteristics or resource allocation of the Lambda function itself. It will not inherently speed up the processing of a single large file or prevent the Lambda function from timing out if its current configuration is insufficient for the task's computational demands.
- ✗
Update the Lambda function code to use a more efficient algorithm.
Why it's wrong here
While optimising algorithms can improve performance, it doesn't directly address the Lambda function's timeout when processing large files if the underlying issue is simply the volume of data exceeding the allocated execution time. This option is tempting as code efficiency is generally a good practice, and it would be the correct choice if the function was slow due to computational overhead rather than data volume.
- ✓
Increase the Lambda function timeout to 15 minutes.
Why this is correct
Lambda functions have a configurable maximum execution duration, up to 15 minutes. If a function is timing out while processing a large file, it indicates that the current timeout setting is insufficient for the task's completion. Directly increasing the timeout provides the function with more wall-clock time to execute, allowing it to finish processing the extensive data without premature termination. This is a straightforward solution when the processing logic itself is sound but simply requires more time.
Visual reference
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
One of 724 original DVA-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.