
Ultimate access to all questions.
A web application uploads images to an Amazon S3 bucket, triggering an event that sends object creation notifications to an Amazon SQS standard queue. This queue triggers a Lambda function to process images and email results to users. Users complain of receiving duplicate emails for a single image upload. The issue is identified as the Lambda function being invoked multiple times per message. What is the least operational overhead solution for this?
A
Enable long polling in the SQS queue by setting the ReceiveMessage wait time to 30 seconds.
B
Switch to an SQS FIFO queue and utilize message deduplication to prevent duplicates.
C
Extend the visibility timeout in the SQS queue beyond the Lambda function's timeout and batch window timeout combined.
D
Alter the Lambda function to remove messages from the SQS queue right after they are received, prior to processing.