DVA-C02 · Question #543
A developer is building an image-processing application that includes an AWS Lambda function. The Lambda function moves images from one AWS service to another AWS service for image processing. For ima
The correct answer is A. Increase the Lambda function's timeout value.. The Lambda function times out because the default 3-second timeout is too short to transfer images larger than 2 MB; increasing the timeout resolves the issue without any code changes.
Question
A developer is building an image-processing application that includes an AWS Lambda function. The Lambda function moves images from one AWS service to another AWS service for image processing. For images that are larger than 2 MB, the Lambda function returns the following error: "Task timed out after 3.01 seconds." The developer needs to resolve the error without modifying the Lambda function code. Which solution will meet these requirements?
Options
- AIncrease the Lambda function's timeout value.
- BConfigure the Lambda function to not move images that are larger than 2 MB.
- CRequest a concurrency quota increase for the Lambda function.
- DConfigure provisioned concurrency for the Lambda function.
How the community answered
(27 responses)- A81% (22)
- B4% (1)
- C7% (2)
- D7% (2)
Why each option
The Lambda function times out because the default 3-second timeout is too short to transfer images larger than 2 MB; increasing the timeout resolves the issue without any code changes.
Lambda functions have a configurable timeout (up to 15 minutes). The error message explicitly states the function timed out after 3.01 seconds, which is the current limit. Increasing this value gives the function sufficient time to move large images without modifying any code.
Filtering out large images would require modifying the Lambda function code, which violates the stated requirement.
Concurrency controls how many function instances run in parallel; it has no effect on the execution duration limit of a single invocation.
Provisioned concurrency reduces cold start latency by pre-warming instances; it does not extend the function's execution timeout.
Concept tested: Lambda function timeout configuration
Source: https://docs.aws.amazon.com/lambda/latest/dg/configuration-timeout.html
Community Discussion
No community discussion yet for this question.