SQS Standard vs FIFO Queues: Differences and When to Use
SQS standard vs FIFO queues: delivery, ordering, deduplication, throughput quotas, message groups, CLI and Terraform setup, and how to choose.
Amazon SQS standard queues give at-least-once delivery, best-effort ordering and nearly unlimited throughput. FIFO queues keep strict order within each message group and remove duplicates sent within a five-minute window, but each API action has a throughput ceiling. Use standard by default and FIFO only when order or duplicate sends would break your logic.
Amazon Simple Queue Service (SQS) is one of the core services covered in our guide to the AWS services DevOps engineers use daily. This post focuses on one decision: which queue type to create. You cannot convert a queue from one type to the other after it exists, so the choice matters on day one. Every quota below was checked against the Amazon SQS Developer Guide in November 2026. AWS revises quotas, so confirm them for your Region before you size a system.
Key takeaways
- Standard queues may deliver a message more than once and out of order. Consumers must be idempotent.
- FIFO queues preserve order per
MessageGroupId, not across the whole queue. More groups means more parallelism. - FIFO deduplication works on sends within a five-minute interval. It does not make your consumer exactly-once if the consumer itself fails mid-task.
- A non-high-throughput FIFO queue allows 300 transactions per second per API action, or 3,000 messages per second with batches of 10. High throughput mode raises this per Region.
- FIFO queue names must end in
.fifo, and the type is fixed at creation. - Both types share the same message size, retention, visibility timeout and long polling limits.
Standard vs FIFO at a glance
| Property | Standard queue | FIFO queue |
|---|---|---|
| Delivery guarantee | At least once; occasional duplicates | Duplicate sends removed within the 5-minute deduplication interval |
| Ordering | Best effort | Strict, within each message group |
| Throughput | Nearly unlimited API calls per second per action | 300 TPS per action (3,000 msg/s batched); higher with high throughput mode |
| Required send parameters | None beyond the body | MessageGroupId; plus a deduplication ID unless content-based deduplication is on |
| Queue name | Any valid name | Must end with .fifo |
| Per-message delay | Supported (message timers) | Queue-level delay only |
| In-flight messages | High quota (see AWS docs) | Up to 120,000 per queue |
| Change type later? | No | No |
How a standard queue behaves
SQS stores each message redundantly across multiple servers. In a standard queue, a receive request samples a subset of those servers, and that design is what gives standard queues their scale. It also explains the two caveats in the AWS documentation. A message can arrive more than once, for example if a server holding a copy was unavailable when another copy was deleted. Messages can also arrive in a different order from the order they were sent.
For most background work this is fine. Resizing images, sending notification emails, fanning out log processing or triggering a rebuild do not care whether job 41 runs before job 40. What they do need is an idempotent consumer: processing the same message twice must leave the system in the same state as processing it once. Common ways to get there:
- Store a processed-message key (an order ID or the SQS message ID) in a table with a conditional write, and skip the work if the key already exists.
- Make the operation naturally idempotent, such as "set status to SHIPPED" instead of "increment shipped count".
- Use database upserts rather than blind inserts.
Standard queues also gained an option called fair queues, where you add a MessageGroupId to standard messages so one noisy tenant cannot starve others. That is a fairness feature, not an ordering guarantee, so do not confuse it with FIFO behaviour.
How a FIFO queue behaves
A FIFO queue guarantees that messages with the same MessageGroupId are delivered in the order they were sent, and that while one message from a group is in flight, the next message from that group is not handed to another consumer. Different groups are processed in parallel. If you put every message in one group, you get a single ordered stream with no parallelism at all.
Pick a group key that matches the unit that needs ordering. For an e-commerce system that is usually the order ID or customer ID, not "orders". For a ledger it might be the account number. This keeps updates for one account in sequence while thousands of accounts move at once.
Deduplication
FIFO queues reject a message whose deduplication ID matches one sent in the previous five minutes. You supply that ID in one of two ways:
- Set
MessageDeduplicationIdexplicitly on each send. Use a business key such asorder-1234-created. - Enable
ContentBasedDeduplicationon the queue, and SQS uses a SHA-256 hash of the message body. Two messages with identical bodies sent within five minutes will collapse into one, which is sometimes not what you want.
Deduplication protects you from producer retries, such as a network timeout that makes your code resend. It does not protect you if the consumer finishes half its work, crashes, and then receives the message again after the visibility timeout. You still want idempotent consumers with FIFO, just with fewer duplicates to absorb.
Throughput and high throughput mode
The SQS quotas page states that in non-high-throughput mode each partition of a FIFO queue supports 300 transactions per second per API action (SendMessage, ReceiveMessage, DeleteMessage). With batches of 10 messages that is 3,000 messages per second. High throughput mode lifts the ceiling, and the limits vary by Region. At the time of writing AWS lists up to 70,000 TPS in US East (N. Virginia), US West (Oregon) and Europe (Ireland), 9,000 TPS in Asia Pacific (Mumbai), and 2,400 TPS as the default in Regions not named. Spread messages across many group IDs or the extra partitions will not help, because one group is always sequential.
Shared limits that apply to both
| Setting | Default | Range |
|---|---|---|
| Maximum message size | 1 MiB (1,048,576 bytes) | Use the Extended Client Library with S3 for larger payloads |
| Message retention | 4 days | 60 seconds to 14 days |
| Visibility timeout | 30 seconds | 0 seconds to 12 hours |
| Delay | 0 seconds | Up to 15 minutes |
| Long polling wait | 0 (short polling) | Up to 20 seconds |
| Batch size | 1 | Up to 10 messages per batch call |
Older blog posts quote a 256 KB message limit. The current quotas page lists 1 MiB, so check which limit your SDK version and any downstream consumer such as Lambda expect.
Creating each queue type with the AWS CLI
A standard queue with long polling and a dead-letter queue:
aws sqs create-queue --queue-name jobs-dlq
aws sqs create-queue --queue-name jobs \
--attributes '{
"ReceiveMessageWaitTimeSeconds": "20",
"VisibilityTimeout": "60",
"RedrivePolicy": "{\"deadLetterTargetArn\":\"arn:aws:sqs:ap-south-1:123456789012:jobs-dlq\",\"maxReceiveCount\":\"5\"}"
}'
A FIFO queue with content-based deduplication and high throughput mode. The dead-letter queue for a FIFO queue must also be FIFO.
aws sqs create-queue --queue-name payments.fifo \
--attributes '{
"FifoQueue": "true",
"ContentBasedDeduplication": "true",
"DeduplicationScope": "messageGroup",
"FifoThroughputLimit": "perMessageGroupId"
}'
aws sqs send-message \
--queue-url https://sqs.ap-south-1.amazonaws.com/123456789012/payments.fifo \
--message-body '{"account":"A-1001","amount":250}' \
--message-group-id A-1001
Setting DeduplicationScope to messageGroup and FifoThroughputLimit to perMessageGroupId is how the AWS documentation enables high throughput for FIFO. The same settings in Terraform:
resource "aws_sqs_queue" "payments" {
name = "payments.fifo"
fifo_queue = true
content_based_deduplication = true
deduplication_scope = "messageGroup"
fifo_throughput_limit = "perMessageGroupId"
visibility_timeout_seconds = 60
}
For a full walkthrough of redrive policies and replaying failed messages, see how to set up SQS queues and dead-letter queues.
Which queue type should you choose?
Ask three questions in order.
- Would out-of-order processing produce a wrong result? A "deposit then withdraw" sequence processed in reverse can bounce a payment. A batch of thumbnails cannot. If the answer is no, standard is usually right.
- Can the consumer be made idempotent cheaply? If yes, a standard queue plus idempotent consumers often beats FIFO, because you avoid the throughput ceiling and group-key design.
- Will peak traffic exceed FIFO limits for your Region? Estimate peak sends per second, divide by your batch size, and compare with the quotas above. If you are close, plan many group IDs and high throughput mode, or redesign so only the ordered part of the workflow uses FIFO.
Typical fits
| Workload | Queue type | Reason |
|---|---|---|
| Image or video processing jobs | Standard | Order irrelevant; high volume |
| Email and push notifications | Standard | Idempotency key on message ID is easy |
| Log or clickstream buffering | Standard | Throughput matters more than order |
| Bank or wallet transactions per account | FIFO | Order per account changes the balance |
| Inventory updates per SKU | FIFO | Late "restock" overwriting a "sold out" is a bug |
| Command sequences to a device | FIFO | "Configure" must precede "start" |
The broader reasons for putting a queue between services at all are covered in the benefits of decoupling services using SQS and SQS use cases in microservice architectures.
SQS with Lambda: what changes between types
Lambda event source mappings work with both queue types. With a standard queue, Lambda scales pollers up as the backlog grows. With a FIFO queue, Lambda processes messages in order within each group, so concurrency is bounded by the number of active groups. Two settings matter for both:
- Set the queue's visibility timeout to at least six times the function timeout, as the Lambda documentation recommends, so messages do not reappear while still being processed.
- Enable
ReportBatchItemFailuresin the function response so one bad message does not force the whole batch back onto the queue.
More patterns are in integrating SQS with EC2 or Lambda.
SNS fan-out and FIFO topics
If one event must reach several queues, publish it to an SNS topic and subscribe each queue. A standard SNS topic can deliver to standard queues. An SNS FIFO topic delivers to SQS FIFO queues and keeps ordering per group across the fan-out. Background on topics is in what AWS SNS is and how pub/sub works.
Monitoring both queue types
SQS publishes CloudWatch metrics per queue. The ones worth alarming on:
ApproximateAgeOfOldestMessage: the clearest sign consumers are falling behind.ApproximateNumberOfMessagesVisible: backlog size; use it for consumer autoscaling.ApproximateNumberOfMessagesNotVisible: in-flight count; for FIFO, watch it against the 120,000 quota.- Message count on the dead-letter queue: any non-zero value deserves a look.
For FIFO queues, a single stuck group (a poison message that keeps failing) blocks every later message in that group until it moves to the DLQ. Keep maxReceiveCount modest so a bad message does not hold a group for hours.
Common mistakes
- Using one
MessageGroupIdfor everything in a FIFO queue, then wondering why throughput is low. - Assuming FIFO means exactly-once end to end and skipping idempotency in the consumer.
- Leaving short polling on, which returns empty responses and costs more requests. Set
ReceiveMessageWaitTimeSecondsto 20. - Setting a visibility timeout shorter than the job takes, which causes duplicate processing on standard queues and blocked groups on FIFO.
- Pointing a FIFO queue's redrive policy at a standard DLQ, which AWS does not allow.
Frequently asked questions
Can I convert a standard queue to FIFO?
No. The type is set when the queue is created. Create a new FIFO queue whose name ends in .fifo, point producers at it, drain the old queue, then delete it.
Does a FIFO queue guarantee exactly-once processing?
It removes duplicate sends within a five-minute deduplication interval and delivers each message once unless it is not deleted before the visibility timeout ends. If your consumer crashes mid-task, the message returns, so consumers should still be idempotent.
Is ordering guaranteed across the whole FIFO queue?
Only within each message group. Messages in different groups can be processed in parallel and in any relative order.
What is the throughput limit of a FIFO queue?
Without high throughput mode, 300 transactions per second per API action, or 3,000 messages per second with batches of 10. High throughput mode raises this per Region; check the SQS quotas page for current figures.
Are standard queues cheaper than FIFO?
AWS prices FIFO requests higher than standard requests. Rates change and differ by Region, so check the Amazon SQS pricing page.
What is the maximum SQS message size?
The current quota is 1 MiB for both types. For larger payloads, store the data in S3 and send a reference using the SQS Extended Client Library.
Should a DLQ for a FIFO queue be FIFO?
Yes. A FIFO source queue requires a FIFO dead-letter queue, and a standard queue requires a standard one.
Learn AWS messaging hands-on
Queues, topics, Lambda triggers and CloudWatch alarms are part of the AWS Solutions Architect Associate training, available in our Kharadi, Pune classroom and live online. If you are preparing for interviews, our AWS services interview questions cover the related services.
References
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Angry
0
Sad
0
Wow
0