AWS · Comparison

Kinesis Data Streams vs MSK vs SQS

Should my events go through a stream (Kinesis or Kafka on MSK) or a queue (SQS)?

Decision summary

A queue (SQS) is for work: each message is processed by one consumer and then deleted. A stream (Kinesis Data Streams or Kafka on MSK) is a log: records stay for a retention period, in order per shard or partition, and many independent consumers read them at their own positions and can replay.

Between the streams: choose Kinesis for an AWS-native, simpler service; choose MSK when you need Apache Kafka APIs, its ecosystem, or are migrating existing Kafka.

Best fit for each option

Kinesis Data Streams

Real-time analytics, several consumers of the same ordered data, replay, AWS-native integrations.

Amazon MSK

Kafka-based systems, Kafka Connect and Streams, migrations from self-managed Kafka, long retention.

Amazon SQS

Decoupling producers and workers, buffering spikes, retries with dead-letter queues.

Side by side

 Kinesis Data StreamsAmazon MSKAmazon SQS
Best forStreaming analytics, many readersKafka streamingWork queues
ScalingShards (provisioned) or on-demand capacityBrokers and partitions, or MSK ServerlessAutomatic; scale consumers
Performance1 MB/s in and 2 MB/s out per shard; enhanced fan-out per consumerKafka throughput by broker sizeNearly unlimited for standard queues
Limits24 hours to 365 days retention; 10 MiB recordsRetention set by you (unlimited on Serverless)Up to 14 days retention; 1 MiB messages
Operational complexityManage shards (or on-demand)Kafka knowledge needed: topics, partitions, versionsLeast to manage
CostShard-hours or data volumeBroker-hours and storage (or serverless usage)Per request

Scaling and topology

Producersapps, IoT, logsKinesis Data Streamsshards · ordered · replayData Firehosebuffer · transform · deliverLambda / custom consumersreal timeManaged Service for Flinkstreaming SQL/analyticsas a sourceS3 (Parquet), Redshiftnear real timeOpenSearch, Splunk, HTTP
Streaming on AWS: Data Streams for real-time consumers and replay, Data Firehose to deliver into stores

Limits and constraints

ItemValueContextSource
Kinesis write throughput per shard 1 MB per second or 1,000 records per second Source
checked
Kinesis retention 24 hours by default, up to 365 days Source
checked
SQS message retention 1 minute to 14 days The default is 4 days. Source
checked

Quotas and limits change. Check the linked source before designing around a number.

When to avoid each option

Kinesis Data Streams

  • Each message should be processed once and removed (use SQS).
  • Existing Kafka code.

Amazon MSK

  • No Kafka requirement, where Kinesis or SQS is simpler.

Amazon SQS

  • Multiple consumers needing the same data, ordering at very high throughput, or replay.

Example scenarios

SituationChooseWhy
Clickstream analysed by three teams independently in real time.Kinesis Data StreamsMany consumers of the same ordered stream.
A company running Kafka on premises wants a managed equivalent.Amazon MSKSame Kafka APIs and tooling.
Image-resize jobs that each worker should take once.Amazon SQSOne consumer per message, with retries.

Exam cues

  • Replay, ordered per key, multiple consumers: Kinesis Data Streams (or MSK for Kafka).
  • Decouple and buffer, one consumer per message: SQS.
  • Deliver a stream to S3 or Redshift with no code: Data Firehose.

Service pages

Related

Courses and lessons

Services, comparisons and patterns

Sources

Independent study material, not affiliated with or endorsed by Amazon Web Services.

Last reviewed · By the ByteCamel team · How we write content

Was this page helpful?

Report a mistake