tool

AWS SQS (Simple Queue Service)

created 2026-05-25 messaging · sqs · aws · managed · queue

AWS SQS (Simple Queue Service)

SQS is the whole product in three API calls. Nothing to install, nothing to tune, nothing to patch. Runs inside AWS. You send, you receive. That’s it.

The model

  • Producers SendMessage to a queue URL.
  • Consumers ReceiveMessage, do the work, then DeleteMessage.
  • If the consumer doesn’t delete the message before its visibility timeout expires, SQS hands it back to another consumer (built-in retry).
  • No exchanges, no routing, no log, no offsets. Just a queue.

Two flavors

FlavorOrderingThroughputDelivery
StandardBest-effortEffectively unlimitedAt-least-once
FIFOStrict order within MessageGroup300/s default, up to tens of thousands with high-throughput mode”Exactly-once processing” (with caveats)

The “exactly-once” caveat

SQS FIFO advertises exactly-once processing. What it actually means:

  • Deduplication on the send side within a 5-minute window (via MessageDeduplicationId).
  • Visibility-timeout-based dedup on the consume side: if you don’t delete the message before the timeout expires, it comes back to another consumer.

The two-generals-problem|network limits haven’t gone away. Your consumer still needs to be idempotency|idempotent. See delivery-guarantees.

When to reach for SQS

  • You’re already on AWS.
  • You want a queue, not a commitment to operating one.
  • Standard works for almost all cases. FIFO if ordering is genuinely required (financial transactions, sequential workflow steps).
  • You’re prototyping and don’t want broker yak-shaving slowing you down.

What SQS doesn’t do

  • No fan-out built in. For pub/sub on AWS, pair with SNS (SNS → multiple SQS subscribers) or reach for EventBridge (richer routing) or Kinesis (log-style, more like kafka).
  • No replay. Once deleted, the message is gone.
  • No routing. Single-queue, single-purpose. If you want routing, you need EventBridge or SNS + multiple SQS queues.

When NOT to pick SQS

  • You need event replay → kafka.
  • You need rich routing → rabbitmq or AWS EventBridge.
  • You’re not on AWS.
  • You need sub-millisecond latency.

Decision shortcut

Replay history → kafka. Rich routing → rabbitmq. On AWS, want zero ops → SQS.

That’s the whole decision 90% of the time.

See also