Kinesis vs SQS: What It Is and When to Use It
Definition
Amazon Kinesis Data Streams and Amazon Simple Queue Service (SQS) are both AWS managed services for handling messages and event data, but they solve different problems. Kinesis is a real-time data streaming service designed to ingest and process large volumes of data from many sources with multiple consumers, making it ideal for analytics and log processing. SQS is a fully managed message queuing service designed to decouple and scale microservices, distributed systems, and serverless applications by reliably storing messages while they wait to be processed by a single consumer component.
How It Works
Understanding the core architecture of each service is key to choosing the right one.
Amazon Kinesis Data Streams is built around the concept of a stream, which is composed of one or more shards.
- Producers send data records to the stream. This can be anything from web servers sending clickstream data, IoT devices sending sensor readings, or database applications sending change data capture events.
- Each record consists of a partition key, a sequence number, and a data blob (up to 10 MB as of late 2025).
- The partition key is used to group data by shard. All records with the same partition key are guaranteed to go to the same shard, which ensures that they are processed in order.
- A shard is the base unit of throughput in a stream. Each shard provides a capacity of 1 MB/second of data input and 2 MB/second of data output. You scale the capacity of your stream by adding or removing shards.
- Consumers (e.g., AWS Lambda functions, Amazon Kinesis Data Analytics applications, or custom applications using the Kinesis Client Library) read records from the shards in the stream.
- Crucially, data is not deleted from the stream when it's read. It remains in the stream for a configurable retention period (from 24 hours up to 365 days). This allows multiple, independent consumer applications to read and process the same data from the stream concurrently or at different times.
Amazon SQS works on the principle of a message queue.
- Producers send messages to a queue. A message can contain up to 1 MB of text data as of August 2025.
- The queue durably stores the messages until a consumer is ready to process them. SQS offers two types of queues:
- Standard Queues: Offer maximum throughput, best-effort ordering, and at-least-once delivery.
- FIFO (First-In-First-Out) Queues: Guarantee message order and exactly-once processing, with lower throughput limits than standard queues.
- Consumers poll the queue and request to receive messages. When a consumer receives a message, it becomes locked and is hidden from other consumers for a configurable period called the visibility timeout.
- After the consumer successfully processes the message, it must explicitly delete the message from the queue. If the consumer fails or the visibility timeout expires before the message is deleted, the message becomes visible again for another consumer to process. This ensures that messages are not lost if a consumer fails.
Comparison Table: Kinesis Data Streams vs. Amazon SQS
| Feature | Amazon Kinesis Data Streams | Amazon SQS | | :--- | :--- | :--- | | Primary Model | Streaming: An ordered log of records. | Queuing: A distributed queue of messages. | | Main Use Case | Real-time analytics, log aggregation, clickstream analysis, IoT data ingestion. | Decoupling microservices, background job processing, task scheduling. | | Consumer Model | Multiple Consumers (Pub/Sub): Many applications can read the same data independently. | Single Consumer Group (Point-to-Point): Messages are processed by one consumer and then deleted. | | Data Retention | Durable & Replayable: 24 hours by default, extendable up to 365 days. Data is not deleted on read. | Transient: 1 minute to 14 days. Messages are deleted after successful processing. | | Ordering | Guaranteed per Shard: Strict ordering for records with the same partition key. | Standard: Best-effort ordering. FIFO: Strict ordering per message group ID. | | Replayability | Yes: Consumers can re-read data from any point within the retention period. | No: Once a message is deleted, it cannot be retrieved. | | Scaling | Manually or automatically scale by managing the number of shards. | Fully Managed: Scales automatically and transparently. | | Payload Size | Up to 10 MB per record. | Up to 1 MB per message. |
Key Features and Limits
Amazon Kinesis Data Streams (as of 2026)
- Capacity Modes: Provisioned (you manage shards) or On-Demand (automatically manages capacity).
- Shard Limits: Default limits have increased significantly, up to 20,000 shards per account in major regions like US East, allowing for massive throughput (up to 10 GB/s ingress).
- Record Size: Maximum payload size of 10 MB.
- Data Retention: Default 24 hours, extendable up to 8760 hours (365 days).
- Consumers: Supports up to 50 enhanced fan-out consumers per stream for dedicated throughput.
Amazon SQS (as of 2026)
- Queue Types: Standard, FIFO, and Fair Queues (a recent addition for standard queues that uses a
MessageGroupId). - Message Size: Maximum payload size of 1 MB.
- Message Retention: Configurable from 1 minute to 14 days.
- Throughput: Standard queues offer virtually unlimited throughput. FIFO queues support up to 300 messages per second by default, or 3,000 with batching and high-throughput mode.
- In-flight Messages: A limit on the number of messages that can be in flight (received by a consumer but not yet deleted).
Common Use Cases
Choose Amazon Kinesis Data Streams for:
- Real-Time Analytics: Ingesting and processing high-volume data streams from sources like website clickstreams, mobile apps, and game telemetry to feed live dashboards.
- Log and Event Data Collection: Aggregating logs from thousands of servers or containers, then processing them in parallel with multiple tools (e.g., one for anomaly detection, another for archiving to Amazon S3).
- IoT Data Ingestion: Capturing continuous streams of data from sensors and connected devices for real-time monitoring and analysis.
- Change Data Capture (CDC): Streaming database changes to multiple downstream systems, such as data warehouses and search indexes, allowing each to consume the changes independently.
Choose Amazon SQS for:
- Decoupling Microservices: An application can send a request to an SQS queue, allowing it to move on without waiting for the downstream service to process it. This improves fault tolerance and scalability.
- Background Job Processing: Offloading long-running tasks like video transcoding, image resizing, or report generation to a pool of worker processes that pull jobs from a queue.
- Buffering and Throttling: Smoothing out spikes in traffic. A web front-end can write messages to a queue at a high rate, while a backend service can process them at a steady pace, preventing the backend from being overwhelmed.
- Order Processing: Ensuring that tasks in a business workflow, such as
OrderReceived,PaymentProcessed, andShipmentInitiated, are handled reliably. SQS FIFO queues are perfect for maintaining the correct sequence of operations.
Pricing Model
-
Amazon Kinesis Data Streams: Pricing is primarily based on two dimensions in Provisioned mode: Shard Hour (an hourly rate for each shard in your stream) and PUT Payload Unit (per million 25 KB units of data ingested). There are additional charges for extended data retention beyond 24 hours and for using Enhanced Fan-Out consumers. The On-Demand mode charges per GB of data written and read.
-
Amazon SQS: Pricing is simpler and based on the number of requests. A request is an action like
SendMessage,ReceiveMessage, orDeleteMessage. Each 64 KB chunk of a payload counts as one request. FIFO queues have a slightly higher price per request than Standard queues. AWS provides a perpetual free tier of 1 million SQS requests per month.
Data transfer charges may apply for both services if data is moved between AWS regions.
Pros and Cons
Kinesis Data Streams
- Pros:
- Enables real-time processing with very low latency.
- Supports multiple consumers processing the same data stream in parallel.
- Data replayability is built-in, which is excellent for testing, recovery, and adding new consumer applications.
- Guarantees order within a shard.
- Cons:
- Can be more complex to manage, especially in Provisioned mode where you need to monitor and scale shards.
- Can be less cost-effective for workloads with very low or spiky traffic compared to SQS.
Amazon SQS
- Pros:
- Extremely simple to use and fully managed, requiring minimal configuration.
- Highly scalable and reliable for decoupling applications.
- Cost-effective, especially with the generous free tier and pay-per-request model.
- Features like visibility timeout and dead-letter queues (DLQs) provide robust error handling for task processing.
- Cons:
- Not designed for multiple consumers to process the same message.
- No native message replay capability.
- Standard queues do not guarantee order.
- Limited message retention of 14 days.
Comparison with Alternatives
- Amazon SNS (Simple Notification Service): While SQS is for one-to-one messaging (from a producer to a single consumer), SNS is for one-to-many (fan-out). A single message published to an SNS topic can be delivered to many subscribers, including SQS queues, Lambda functions, and HTTP endpoints. You often use SNS and SQS together to fan out a message to multiple SQS queues, each for a different microservice.
- Amazon EventBridge: An event bus service that is ideal for building event-driven architectures. It's similar to Kinesis in that it can route events to multiple targets, but it excels at content-based filtering. EventBridge has native integrations with many SaaS partners and AWS services, making it easy to react to events from sources like Zendesk or Shopify. It's generally used for routing distinct events, whereas Kinesis is used for streaming large volumes of undifferentiated data.
Exam Relevance
This is a critical topic for several AWS certifications, especially:
- AWS Certified Solutions Architect - Associate (SAA-C03): Expect scenario-based questions asking you to choose between Kinesis and SQS. Key decision factors are the number of consumers, the need for data replay, and whether the primary goal is real-time analytics or application decoupling.
- AWS Certified Developer - Associate (DVA-C02): Questions will focus on the implementation details, such as using the SQS API (visibility timeout, long polling) versus the Kinesis API (partition keys, shards).
- AWS Certified Data Analytics - Specialty (DAS-C01): Deep knowledge of Kinesis architecture, scaling, and integration with other analytics services is required.
For exams, if the scenario mentions multiple applications needing to process the same stream of events, real-time dashboards, or replaying data, the answer is almost always Kinesis. If the scenario involves decoupling applications, processing background jobs, or buffering requests, the answer is SQS.
Frequently Asked Questions
Q: Can an SQS queue have multiple consumers?
A: Yes, but they operate in a competing consumer pattern. Multiple consumer instances can poll the same queue, but any given message will only be processed by one of them. Once a message is successfully processed and deleted, it's gone. This is fundamentally different from Kinesis, where multiple applications can all read the entire stream of data.
Q: Can I replay messages in SQS?
A: No, SQS does not have a built-in replay feature. Once a message is successfully processed and deleted, it cannot be retrieved. If you need the ability to re-process data, Amazon Kinesis Data Streams is the appropriate service.
Q: Which service is cheaper, Kinesis or SQS?
A: It depends entirely on the workload. For low-volume, task-based workloads, SQS is often cheaper due to its pay-per-request model and large free tier. For high-throughput, persistent streaming workloads, Kinesis can be more cost-effective per GB of data processed, but it has a baseline cost associated with running shards 24/7.
This article reflects AWS features and pricing as of 2026. AWS services evolve rapidly — always verify against the official AWS documentation before making production decisions.