DVA-C02 · Question #286
DVA-C02 Question #286: Real Exam Question with Answer & Explanation
The correct answer is A: Increase the memory configuration of the Lambda function.. In Lambda, memory allocation directly controls CPU power; increasing memory gives the function proportionally more CPU cycles, allowing it to process long video files faster and avoid timeouts.
Question
An Amazon Simple Queue Service (Amazon SQS) queue serves as an event source for an AWS Lambda function. In the SQS queue, each item corresponds to a video file that the Lambda function must convert to a smaller resolution. The Lambda function is timing out on longer video files, but the Lambda function's timeout is already configured to its maximum value. What should a developer do to avoid the timeouts without additional code changes?
Options
- AIncrease the memory configuration of the Lambda function.
- BIncrease the visibility timeout on the SQS queue.
- CIncrease the instance size of the host that runs the Lambda function.
- DUse multi-threading for the conversion.
Explanation
In Lambda, memory allocation directly controls CPU power; increasing memory gives the function proportionally more CPU cycles, allowing it to process long video files faster and avoid timeouts.
Common mistakes.
- B. Increasing the SQS visibility timeout prevents a message from being redelivered to another consumer while in flight, but it does not make the Lambda function run faster or prevent it from timing out during processing.
- C. Lambda is a managed serverless service; developers cannot choose or configure the underlying host instance size — this is controlled entirely by the memory configuration setting.
- D. Adding multi-threading requires code changes, which the question explicitly prohibits as a solution path.
Concept tested. Lambda memory-to-CPU ratio for compute-intensive workload optimization
Reference. https://docs.aws.amazon.com/lambda/latest/dg/configuration-memory.html
Community Discussion
No community discussion yet for this question.