You must build a workflow that processes messages arriving in an Amazon SQS queue. After a message arrives, the workflow should wait a specified delay before invoking a Lambda function to process it. Which approach provides this behavior with the LEAST operational effort?
Choose an answer
Tap an option to check your answer.
Correct answer: Set the SQS queue’s DelaySeconds to the required delay. Configure an event source mapping for the Lambda function and specify the SQS queue as the source..
Why this is the answer
Setting the SQS queue's DelaySeconds attribute ensures that new messages remain invisible for the specified duration before becoming available for consumption. When combined with a Lambda event source mapping, the Lambda function will automatically be invoked only after the delay has passed, directly processing messages as they become visible. This is the most straightforward and operationally least intensive solution. Using AWS Step Functions with a Wait state and an EventBridge trigger introduces unnecessary complexity and overhead for a simple message delay. Reposting messages within a Lambda function to implement a custom delay mechanism is inefficient and adds significant operational burden. Setting the Visibility Timeout only prevents a message from being processed by another consumer during the timeout period after it has already been received, not delaying its initial availability.
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