Amazon SQS queue guide: choosing Standard or FIFO for order and duplicates
Choose an Amazon SQS Standard queue when throughput and scale matter most and your application can handle duplicates or order variation. Choose FIFO when strict ordering within message groups and suppression of duplicate sends matter. FIFO's five-minute deduplication window does not guarantee exactly-once business effects, so consumers still need duplicate-safe logic.
Choose an Amazon SQS Standard queue when throughput and scale matter most and your application can handle duplicates or order variation. Choose FIFO when strict ordering within message groups and suppression of duplicate sends matter. FIFO's five-minute deduplication window does not guarantee exactly-once business effects, so consumers still need duplicate-safe logic.
Match requirements to queue type
| Requirement | Choice | Design consequence |
|---|---|---|
| High request volume; order may vary | Standard | Delivery is at least once; handle duplicates and do not rely on order |
| Strict sequence for one stream | FIFO with one MessageGroupId | Messages in the group are processed sequentially; later work can wait for earlier work |
| Preserve order per order/account while processing concurrently | FIFO with a MessageGroupId per order/account | Groups can run in parallel, but ordering applies within each group |
| High volume and tenant fairness | Consider MessageGroupId fair-queue support in Standard | Helps balance tenant dwell time; it does not provide FIFO ordering |
| Suppress duplicate FIFO sends after producer retries | Explicit MessageDeduplicationId or content-based deduplication | The window is five minutes; a later resend may be accepted again |
Set the ordering scope with message groups
In FIFO queues, MessageGroupId identifies the unit whose order matters. For order status changes, using the order ID lets different orders run concurrently while keeping each order's changes in sequence. A single group effectively creates one serial stream and limits parallelism. Excessively fine grouping where order does not matter adds operational complexity without useful guarantees.
Standard queues provide at-least-once delivery. Their distributed design can deliver duplicates and occasional out-of-order messages. SQS makes a best-effort attempt to preserve send order, but it is not strict. With Standard, use a business key for idempotent handling and validate state transitions instead of depending on order.
Boundaries of FIFO deduplication
For FIFO, a producer can send a MessageDeduplicationId or enable content-based deduplication. Content-based deduplication hashes the message body with SHA-256; message attributes are excluded. Repeated sends with the same deduplication ID are suppressed within the five-minute interval, but a resend after that interval may create another queue message.
This suppresses duplicate messages entering the queue; it does not make external effects exactly once. If a consumer updates an external database and stops before DeleteMessage, it may receive the message again. Use idempotency keys, a deduplication table, or transaction boundaries for payments, email, and external API calls.
Selection and verification
**Identify the unit that needs order.** Decide whether it is the whole queue or an order, account, or session.
**Set delivery tolerance.** If duplicates and order variation are acceptable, consider Standard; use FIFO if strict order within a group is required.
**Design MessageGroupId.** In FIFO, group only messages that need a shared sequence and check parallelism across groups. For Standard fair queues, set a consistent tenant identifier.
**Define deduplication identity.** Reuse the same ID for retries of one logical event. With content-based deduplication, check whether equal bodies with different attributes should count as duplicates.
**Review consumer failures.** Design for duplicate receipt if a consumer stops before or after the business effect and before deleting the message.
**Verify actual settings.** Queue type cannot be changed after creation. Use a test queue to check per-group order, the deduplication interval, throughput, and failure behavior before creating a production queue. This is a recommended procedure, not a claim that tests were run.
FIFO queues have per-second request limits; high-throughput settings can raise them. Check current quotas for the AWS Region and queue configuration. Also verify the message-body size limit and FIFO restriction on per-message delay in the API specification.
Sources and scope
AWS, [Standard queues](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/standard-queues.html)
AWS, [FIFO queues](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-fifo-queues.html)
AWS, [Exactly-once processing in Amazon SQS](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-exactly-once-processing.html)
AWS, [SendMessage API](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html)
Based on AWS official documentation read on 2026-11-19. SQS is managed, and quotas and features can vary by Region and over time; verify current AWS docs and queue attributes before deployment. This guide focuses on Standard/FIFO selection, not detailed visibility timeout, DLQ, IAM, or encryption procedures.