AWS Certified Solutions Architect – Associate (SAA-C02) — Question 692

An image-processing company has a web application that users use to upload images. The application uploads the images into an Amazon S3 bucket. The company has set up S3 event notifications to publish the object creation events to an Amazon Simple Queue Service (Amazon SQS) standard queue. The SQS queue serves as the event source for an AWS Lambda function that processes the images and sends the results to users through email.
Users report that they are receiving multiple email messages for every uploaded image. A solutions architect determines that SQS messages are invoking the
Lambda function more than once, resulting in multiple email messages.
What should the solutions architect do to resolve this issue with the LEAST operational overhead?

Answer options

Correct answer: C

Explanation

When AWS Lambda processes messages from an Amazon SQS queue, the visibility timeout of the queue must be configured to be greater than the sum of the function timeout and the batch window timeout. If the visibility timeout is too low, the message becomes visible to other consumers before the current Lambda execution finishes, resulting in duplicate processing. Changing to a FIFO queue is not a viable option with least operational overhead because Amazon S3 event notifications cannot target SQS FIFO queues directly.