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 Streams | Amazon MSK | Amazon SQS | |
|---|---|---|---|
| Best for | Streaming analytics, many readers | Kafka streaming | Work queues |
| Scaling | Shards (provisioned) or on-demand capacity | Brokers and partitions, or MSK Serverless | Automatic; scale consumers |
| Performance | 1 MB/s in and 2 MB/s out per shard; enhanced fan-out per consumer | Kafka throughput by broker size | Nearly unlimited for standard queues |
| Limits | 24 hours to 365 days retention; 10 MiB records | Retention set by you (unlimited on Serverless) | Up to 14 days retention; 1 MiB messages |
| Operational complexity | Manage shards (or on-demand) | Kafka knowledge needed: topics, partitions, versions | Least to manage |
| Cost | Shard-hours or data volume | Broker-hours and storage (or serverless usage) | Per request |
Scaling and topology
Limits and constraints
| Item | Value | Context | Source |
|---|---|---|---|
| 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
| Situation | Choose | Why |
|---|---|---|
| Clickstream analysed by three teams independently in real time. | Kinesis Data Streams | Many consumers of the same ordered stream. |
| A company running Kafka on premises wants a managed equivalent. | Amazon MSK | Same Kafka APIs and tooling. |
| Image-resize jobs that each worker should take once. | Amazon SQS | One 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
- Amazon Kinesis · Real-time streaming: Kinesis Data Streams captures ordered records for custom consumers, and Data Firehose delivers streams to storage and analytics.
- Amazon Managed Streaming for Apache Kafka (Amazon MSK) · Fully managed Apache Kafka: run Kafka clusters and connectors on AWS using standard Kafka APIs, provisioned or serverless.
- Amazon SQS · A fully managed message queue that decouples producers from consumers, so work is buffered and processed at the consumer's pace.
Related
Courses and lessons
- Streaming data: Kinesis Data Streams, Data Firehose and Amazon MSK · AWS Solutions Architect – Associate (SAA-C03) · Members
- Amazon SQS: queues, FIFO, visibility timeout and dead-letter queues · AWS Solutions Architect – Associate (SAA-C03) · Members
Services, comparisons and patterns
- Amazon Kinesis · Service
- Amazon Managed Streaming for Apache Kafka (Amazon MSK) · Service
- Amazon SQS · Service
- Amazon EventBridge · Service
- SQS vs SNS vs EventBridge · Comparison
Sources
Independent study material, not affiliated with or endorsed by Amazon Web Services.