A Lambda function consumes messages from an Amazon SQS standard queue but sometimes processes the same message multiple times. What is the most cost-effective way to stop duplicate processing?
Choose an answer
Tap an option to check your answer.
Correct answer: Replace the SQS standard queue with an SQS FIFO queue and use the message deduplication ID..
Why this is the answer
Replacing the SQS standard queue with an SQS FIFO (First-In, First-Out) queue and utilizing its message deduplication feature is the most cost-effective and direct solution. SQS FIFO queues guarantee exactly-once processing and prevent duplicate messages from being delivered for a specified deduplication interval, which directly addresses the problem of duplicate processing. Configuring a dead-letter queue (DLQ) helps manage messages that fail processing but does not prevent duplicate processing of successfully delivered messages. Setting the Lambda function's reserved concurrency to 1 would severely limit throughput and introduce a bottleneck, not solve the root cause of SQS delivering duplicates in a standard queue. Switching to Amazon Kinesis Data Streams is a more complex and expensive solution designed for real-time data streaming, which is overkill for simply preventing duplicate message processing from a queue.
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