An SQS queue is an event source for a Lambda function that converts video files to a lower resolution. The Lambda is timing out on longer videos, and its timeout is already set to the maximum allowed. How can a developer prevent these timeouts without modifying the function code?
Choose an answer
Tap an option to check your answer.
Correct answer: Increase the Lambda function's memory allocation..
Why this is the answer
Increasing the Lambda function's memory allocation is the correct solution because, in AWS Lambda, CPU and network bandwidth are proportionally allocated based on the configured memory. A higher memory setting provides more processing power, which can significantly reduce the execution time for CPU-intensive tasks like video conversion, thus preventing timeouts without code changes. Increasing the SQS queue's visibility timeout only affects how long messages are hidden from other consumers after being read; it doesn't impact the Lambda function's execution duration. Lambda functions run on a serverless infrastructure, so you cannot directly increase the instance size of the host. Implementing multi-threading would require modifying the function code, which the question explicitly states should be avoided.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed