Skip to content

Messaging, Events and Streaming

This section covers the AWS services that move data between components without the components calling each other directly: queues, publish/subscribe topics, event buses, streams, managed brokers and the orchestration services that sit on top of them.

Four services carry most of the traffic in a typical AWS estate, and the table below is the one canonical comparison of them on this site. The pages beneath this one go into each in detail: SQS for queues, SNS for fan-out, EventBridge for rule-based routing and Kinesis for streams. Alongside them sit Amazon MQ and Amazon MSK for teams bringing an existing broker or Kafka estate to AWS, AppFlow and AppSync for SaaS and client-facing integration, and Step Functions for orchestrating the work that the messages trigger.

A new design is best started at the comparison below, then continued on the page for the service it points to.

  • Amazon SQS (Simple Queue Service) is a message queue. Producers send messages, consumers poll for them, and each message is processed by exactly one consumer. It is the standard way to decouple a producer from a slower or less available consumer.
  • Amazon SNS (Simple Notification Service) is publish/subscribe messaging. A message published to a topic is pushed to every subscriber — SQS queues, Lambda functions, HTTP(S) endpoints, email, SMS, mobile push and Amazon Data Firehose.
  • Amazon Kinesis Data Streams is an ordered, replayable stream. Records stay in the stream for a configured retention period and any number of consumers can read the same records independently, in order, and re-read them later.
  • Amazon EventBridge is a serverless event bus. Events arrive from AWS services, SaaS partners or an application’s own code, rules match them against JSON patterns, and matching events are pushed to targets. Nothing is retained unless an archive is configured.
FeatureSQSSNSKinesis Data StreamsEventBridge
ModelQueue, point-to-pointPub/sub topicOrdered, replayable streamEvent bus with pattern-matching rules
Typical useDecoupling, buffering, work distributionFan-out, notificationsAnalytics, telemetry, change feedsService integration, scheduling, SaaS events
Retention4 days by default, 1 minute to 14 daysNone — delivered or dropped (FIFO topics can be archived and replayed)24 hours by default, up to 365 daysNone by default; an archive retains events indefinitely unless a period is set
Message size1 MiB (up to 2 GB with the Extended Client Library and S3)256 KiB (up to 2 GB with the Extended Client Libraries and S3)Up to 10 MiB per record256 KB per event
DeliveryPull (short or long polling)PushPull with GetRecords, or pushed to an enhanced fan-out consumer or LambdaPush to targets
OrderingGuaranteed in FIFO queuesGuaranteed in FIFO topicsGuaranteed per partition key within a shardNot guaranteed
ConsumersOne consumer per messageMany subscribersMany; shared consumers split 2 MB/s per shard, enhanced fan-out gives each 2 MB/sUp to 5 targets per rule
ReplayNo — failed messages go to a dead-letter queue and can be redrivenFIFO topics only, via an archive policyYes — re-read from any point in the retention window using a shard iteratorOnly from an archive
ScalingAutomaticAutomaticOn-demand, or by splitting and merging shardsAutomatic
TransformationNoneNoneIn the consumer, or with Amazon Managed Service for Apache FlinkInput transformer on a target; enrichment with EventBridge Pipes
  1. Persistence. SQS holds a message until a consumer deletes it or the retention period expires. SNS and EventBridge hold nothing: a message that cannot be delivered is retried and then dropped, unless a dead-letter queue (both) or an archive (EventBridge, and SNS FIFO topics) is configured. Kinesis keeps every record for the whole retention period regardless of who has read it.
  2. Delivery model. SQS is pull; consumers ask for work when they have capacity. SNS and EventBridge push; the subscriber or target has to absorb the rate at which events arrive, which is why a queue is so often placed between a topic and its consumer.
  3. Consumer count. An SQS message belongs to one consumer. An SNS message goes to every subscriber. A Kinesis record can be read by every consumer, repeatedly, until it ages out.
  4. Ordering. Only SQS FIFO queues, SNS FIFO topics and Kinesis shards give ordering guarantees. EventBridge attempts to deliver in order but does not promise it.
  5. Routing. EventBridge is the only one of the four that routes on the content of the message as a first-class feature across a large catalogue of AWS sources and targets. SNS can filter on message attributes or on the message body, but it does not route: every subscriber whose filter matches gets the same message.
  • Use SQS to decouple a producer from a consumer, absorb spikes, and retry work safely — the default choice for “this task should happen, eventually, exactly once”.
  • Use SNS to deliver the same message to several independent subscribers, usually with an SQS queue in front of each one so that a slow subscriber cannot lose messages.
  • Use EventBridge to route events between services on content, to schedule work, and to receive events from AWS services and SaaS partners without writing glue code.
  • Use Kinesis Data Streams when order matters across a high-volume feed, when several consumers need the same records, or when records must be replayable after a bug is fixed.

Nearly every throughput figure in these services is a per-account, per-Region quota that varies between Regions and can be raised in the Service Quotas console, so check the console for the target Region rather than relying on a figure in any document. The shape of the limits is worth knowing:

  • SQS standard queues accept a very high, effectively unbounded rate of API calls.
  • SQS FIFO queues allow 300 transactions per second per API action, or 3,000 messages per second with batching. High-throughput mode raises this substantially — to 70,000 transactions per second in US East (N. Virginia), US West (Oregon) and Europe (Ireland), and lower elsewhere — and throughput then scales with the number of distinct message group IDs.
  • SNS publishing is capped per account per Region across all topics: 30,000 messages per second in US East (N. Virginia), 9,000 in US West (Oregon) and Europe (Ireland), and 300 in most other Regions for standard topics.
  • EventBridge PutEvents is likewise per account per Region: 10,000 per second in US East (N. Virginia), US West (Oregon) and Europe (Ireland), 1,200 in Europe (London), and 400 in many other Regions. Five targets per rule is a hard limit.
  • Kinesis is sized by capacity mode. A provisioned shard takes 1 MB/s and 1,000 records per second of writes and serves 2 MB/s of reads; on-demand streams start at 4 MB/s of writes and scale far beyond that.