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

A developer is creating an AWS Lambda function that consumes messages from an Amazon Simple Queue Service (Amazon SQS) standard queue. The developer notices that the Lambda function processes some messages multiple times.

How should developer resolve this issue MOST cost-effectively?

Answer options

Correct answer: A

Explanation

Amazon SQS standard queues guarantee at-least-once delivery, which can sometimes lead to duplicate message processing. Upgrading to an Amazon SQS FIFO queue with message deduplication IDs ensures exactly-once delivery and processing, making it the most cost-effective solution to this issue. Other approaches, such as migrating to Amazon Kinesis Data Streams or limiting Lambda concurrency, either increase costs significantly or fail to address the underlying duplication behavior of standard queues.