SQS Is Delivering the Same Message Twice. Is the Queue Broken?

Consumers occasionally process the same SQS message twice, causing double charges. A teammate says switch everything to FIFO. Defend the real fix.

intermediate13 min5 roundsAWS

Answer key reviewed by Branko Petric

Read first: AWS Fundamentals for DevOps

Your decision

Your workers sometimes process the same SQS message twice, leading to duplicate charges and emails. A teammate says standard SQS is broken and wants to move everything to FIFO. What is actually happening, and what do you do?

The situation

A small fraction of jobs in your queue-driven system run twice. Because each job charges a card and sends a receipt, the duplicates show up as double charges and duplicate emails to customers.

Context

Workers poll a standard SQS queue, do work that can take a couple of minutes, then delete the message. The queue visibility timeout is set to thirty seconds. There is no dead-letter queue and the processing has no dedup or idempotency key. A teammate concluded that standard SQS is unreliable and wants to migrate every queue to FIFO.

More: AWS scenario interview questions