AWS Certified Developer – Associate (DVA-C02) — Question 290

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?

Answer options

Correct answer: A

Explanation

Increasing the memory allocated to an AWS Lambda function proportionally scales up its CPU power and performance, allowing the video conversion to complete faster and avoid timeouts without code modifications. Modifying the SQS visibility timeout does not speed up the execution, and developers cannot manage the underlying host instance size in a serverless environment. Additionally, implementing multi-threading would require rewriting code, which goes against the requirement of making no code changes.