Amazon Kinesis

Amazon Kinesis: Catching Data the Instant It's Born

A zero-jargon walkthrough of how AWS captures, holds, and delivers millions of events per second — before that data ever has a chance to go stale.

Picture a stock ticker, a fleet of delivery trucks reporting GPS coordinates every second, or a mobile game logging every tap a million players make at once. None of that data can wait for a nightly batch job — by the time tomorrow’s report runs, the moment that mattered has already passed. Amazon Kinesis exists to solve exactly this problem: capturing fast-moving data the instant it is produced, and making it available to whoever needs it, in seconds rather than hours. By the end of this guide, you will understand what Kinesis actually does under the hood, how its pieces fit together, and why real companies reach for it instead of simply writing data straight into a database.

1Core Concepts

What Kinesis actually is, before any architecture diagrams.

Amazon Kinesis is a family of AWS services for collecting, processing, and delivering fast-moving (“streaming”) data in near real time. The flagship service, Kinesis Data Streams, works like a durable, ordered, continuously flowing pipe: producers write small records into the pipe, and one or more consumers read those same records back out, independently and at their own pace, without ever removing the data for anyone else reading it.

Everyday Analogy

Think of a live sports broadcast. The stadium camera crew (the producer) is constantly generating video, and it’s being pushed out over the airwaves the instant it happens. One household watches on a television, another records it on a DVR to watch later, and a sports app pulls the same feed to update a live score ticker — all three are reading the exact same broadcast, at their own pace, without interfering with each other. Kinesis Data Streams is that broadcast signal for data: producers push, and any number of independent consumers tune in.

The word “streaming” is doing real work here, and it’s worth defining precisely. A traditional database write is a single, isolated transaction — write a row, move on. A message queue like Amazon SQS typically delivers each message to exactly one consumer, and then the message is gone. A stream is different on both counts: records arrive continuously in the order they were written, they are retained for a configurable window of time rather than deleted after one read, and multiple independent applications can all read the same records without one consumer “using up” data meant for another.

Kinesis is actually a family of four related services, and beginners often conflate them. Kinesis Data Streams is the core, general-purpose stream you build custom producers and consumers around. Kinesis Data Firehose is a fully managed delivery pipe that automatically loads streaming data into destinations like Amazon S3 or Amazon Redshift, with no consumer code to write. Managed Service for Apache Flink (formerly Kinesis Data Analytics) lets you run SQL-like or Flink-based queries directly against a moving stream. Kinesis Video Streams handles the same real-time-capture idea but for video and audio rather than small data records. This guide focuses primarily on Kinesis Data Streams, since it is the foundation the other services build on.

i
Key Distinction

A queue deletes a message once it’s successfully read. A Kinesis stream keeps records available to any consumer, for the whole retention window, even after other consumers have already read them. This “replayability” is the single biggest reason teams choose streams over queues for analytics and multi-consumer pipelines.

It also helps to separate two ideas beginners often blend together: “real time” and “batch.” A batch system collects data over a period — an hour, a day — and processes it all at once, which is efficient but means every insight is old by the time it’s produced. Kinesis belongs to the opposite world, often called “stream processing,” where individual records or small groups of records are handled within seconds of arriving. Neither approach is universally better; a monthly billing report is perfectly happy running as a batch job, while a fraud alert or a live dashboard needs the stream approach because value decays the moment the data goes stale.

Another concept worth locking in early is that a Kinesis stream itself stores nothing permanently — it is a temporary, ordered holding area, not a database. This distinction trips up beginners who assume that because data lives in a stream, it is automatically archived somewhere. In reality, if you need to keep streamed data indefinitely for later querying, you deliberately route it into a long-term store, most commonly through Kinesis Data Firehose writing into Amazon S3 or a data warehouse. The stream’s job is to move data fast and reliably for a limited window, not to be your system of record.

2Architecture & Components

The building blocks that turn “a pipe” into a real, scalable system.

Every Kinesis Data Stream is made of one or more shards. A shard is the fundamental unit of capacity and throughput — each shard guarantees a fixed write and read rate, and it stores records in the strict order they were received. When your data volume grows beyond what one shard can handle, you don’t upgrade to a “bigger shard”; you add more shards, spreading incoming data across them.

Component 01

Producers

Applications, IoT devices, servers, or the Kinesis Producer Library (KPL) that write (“put”) records into a stream, typically batching small events for efficiency.

Component 02

Shards

Ordered, append-only sequences of records inside a stream. Each shard supports 1 MB/sec (or 1,000 records/sec) writes and up to 2 MB/sec reads with the classic capacity mode.

Component 03

Partition Key

A value you attach to every record that determines which shard it lands in. Records sharing a partition key always land on the same shard, preserving their relative order.

Component 04

Consumers

Applications reading from the stream — custom code using the Kinesis Client Library (KCL), AWS Lambda triggers, or downstream services like Firehose and Managed Service for Apache Flink.

Two capacity modes control how shards behave. Provisioned mode requires you to explicitly choose the shard count, giving predictable cost and throughput but requiring you to plan for peak load. On-demand mode automatically scales shard capacity up and down based on observed traffic over the last 30 days, trading a little cost efficiency for zero manual capacity planning — a good default for beginners and unpredictable workloads.

graph LR
    P1["Producer:
Mobile App"] -->|"PutRecord"| STREAM P2["Producer:
IoT Sensor Fleet"] -->|"PutRecords (batch)"| STREAM subgraph STREAM["Kinesis Data Stream"] S1["Shard 1"] S2["Shard 2"] S3["Shard 3"] end STREAM --> C1["Consumer:
KCL Application"] STREAM --> C2["Consumer:
AWS Lambda"] STREAM --> C3["Kinesis Data Firehose"] C3 --> S3B["Amazon S3"] STREAM --> C4["Managed Service
for Apache Flink"] C4 --> DASH["Real-Time Dashboard"]
FIG. 1 — Producers write into shards by partition key; independent consumers (custom apps, Lambda, Firehose, Flink) read the same stream in parallel.

Notice in the diagram that the same stream feeds four completely different consumers simultaneously — a custom application, a Lambda function, Firehose (which lands data into S3), and Flink (which powers a live dashboard). None of these consumers compete with each other for records; each maintains its own independent read position, called a shard iterator or, in more modern applications, a checkpoint tracked through the Kinesis Client Library.

3Internal Working

What happens between a producer calling PutRecord and a consumer seeing that data.

When a producer calls the PutRecord or PutRecords API action, it sends a data blob (up to 1 MB) along with a partition key. Kinesis runs the partition key through a hash function, and the resulting hash value determines exactly which shard receives the record — every shard owns a specific range of hash values, similar to how a library assigns each shelf a range of last names. Once the record lands in its shard, Kinesis assigns it a strictly increasing sequence number, guaranteeing that within that shard, records are always readable in the exact order they arrived.

On the read side, a consumer doesn’t get records pushed to it automatically by default — it asks. Using the classic pull-based model, a consumer calls GetShardIterator to establish a starting position in a shard (from the oldest available record, the newest, a specific sequence number, or a specific timestamp), then repeatedly calls GetRecords to pull batches of data, advancing its position each time. For lower latency, Enhanced Fan-Out flips this model: Kinesis pushes records to each registered consumer over a dedicated, private throughput channel, cutting typical delivery latency from around 200 milliseconds down to about 70 milliseconds, and giving every consumer its own full 2 MB/sec read throughput instead of sharing it.

1

Producer Sends a Record

An application calls PutRecord with a data payload and a partition key, such as a device ID or customer ID.

2

Partition Key Is Hashed

Kinesis hashes the key to determine which shard’s hash-key range the record falls into.

3

Record Is Appended

The record is written to the end of that shard and assigned an ever-increasing sequence number.

4

Consumer Reads or Is Pushed To

A consumer pulls batches via GetRecords, or receives a push via Enhanced Fan-Out, advancing its own checkpoint.

5

Record Ages Out

Once the retention period expires (24 hours by default, extendable up to 365 days), the record is no longer retrievable by any consumer.

This is why partition key choice matters so much in practice: pick a key that is too uniform (like a fixed constant, or a single popular customer ID), and every record piles onto one shard, creating a “hot shard” while the rest sit idle. Pick a key with good, even distribution, and Kinesis naturally spreads load across all your shards.

It’s worth walking through a concrete example, because the hashing behavior can feel abstract otherwise. Imagine a ride-sharing stream with four shards and a partition key of driver ID. Driver “D-1042” will always hash to the same shard, meaning every location ping from that driver arrives in order, one after another — perfect for a consumer that needs to trace one driver’s exact route. Meanwhile, driver “D-8871” might hash to a completely different shard, and their pings are processed in parallel, on a separate shard, with no bearing on D-1042’s ordering. This is the core trade-off of sharded streaming: you get strong ordering per key, and near-limitless parallelism across keys, but no built-in guarantee of ordering between two different keys on two different shards.

4Data Flow & Lifecycle

Following one record from birth to expiry.

Unlike a queue, where a record’s lifecycle ends the moment one consumer reads it, a Kinesis record’s lifecycle is governed entirely by time. The moment it’s written, a retention clock starts. By default that clock runs for 24 hours; you can extend it up to 7 days at standard cost, or up to 365 days on extended retention pricing. During that entire window, any consumer — even one that starts reading weeks after the data first arrived, as long as it’s within retention — can request records from any point in the shard’s history, a capability called replay.

StageWhat HappensWho/What Is Responsible
IngestionProducer calls PutRecord/PutRecords with a payload and partition keyYour application or device
ShardingKinesis hashes the partition key and routes the record to the owning shardKinesis Data Streams
OrderingRecord receives a monotonically increasing sequence number within its shardKinesis Data Streams
RetentionRecord remains retrievable for the configured retention window (24 hours to 365 days)Kinesis Data Streams
ConsumptionOne or more independent consumers pull or receive the record and process itYour consumer applications
CheckpointingConsumer records its last-processed sequence number so it can resume correctly after a restartKinesis Client Library / your consumer logic
ExpiryRecord becomes permanently unavailable once it ages past the retention windowKinesis Data Streams
24 hrs
default retention window
365 days
maximum extended retention
1 MB
maximum size of a single record

Replay is not a side feature — it is one of the biggest practical reasons teams choose Kinesis over simpler alternatives. If a downstream analytics job has a bug and produces bad output for six hours, you don’t need to somehow “resend” the original data; as long as it’s still within the retention window, you simply point a corrected consumer back at an earlier sequence number and reprocess it.

Extended retention comes with a genuine trade-off worth naming: storing records for 365 days instead of the default 24 hours increases cost, because AWS is keeping far more data resident and replicated across Availability Zones for far longer. Teams typically reserve long retention windows for streams where replay value is high — compliance-sensitive event logs, or pipelines feeding machine learning models that benefit from reprocessing historical data with an improved algorithm — rather than applying long retention as a blanket default across every stream in an account.

5Advantages, Disadvantages & Trade-offs

Where Kinesis earns its complexity, and where it adds more than you need.

Advantages

  • True multi-consumer fan-out: many independent applications can read the same data without competing
  • Built-in replay within the retention window, invaluable for debugging and reprocessing
  • Strict per-shard ordering, critical for use cases like financial transaction sequencing
  • Scales horizontally by adding shards, without redesigning the application
  • Deep integration with Lambda, Firehose, and Managed Service for Apache Flink for near-zero-code pipelines

Disadvantages / Limits

  • More operational concepts to learn (shards, partition keys, iterators) than a simple queue
  • Only ordered within a shard, not across the whole stream — global ordering requires a single shard, which caps throughput
  • Records are immutable and time-limited; it is not a substitute for a durable, queryable database
  • Poor partition key choices can silently create hot shards and throttling
  • Provisioned mode requires proactive capacity planning to avoid write throttling during traffic spikes
“A queue answers ‘has this been processed?’ A stream answers ‘what happened, in what order, and can I watch it again?'”

6Performance, Scalability, High Availability & Reliability

How Kinesis behaves under real load, and what keeps it running.

Throughput in Kinesis Data Streams scales almost linearly with shard count, because each shard is an independent unit of capacity. A stream with 10 shards in provisioned mode can absorb roughly 10 MB/sec of writes and serve up to 20 MB/sec of reads under the classic model, or far more with Enhanced Fan-Out spreading reads across dedicated channels per consumer. On-demand mode watches your traffic pattern automatically and adds shard capacity as sustained throughput grows, removing the guesswork for teams that don’t yet know their peak load.

Every shard’s data is synchronously replicated across multiple Availability Zones within a region before a write is acknowledged back to the producer, which is what gives Kinesis its durability guarantee — a successful PutRecord response means the data has already survived a single data center failure. Because this replication happens automatically and is managed entirely by AWS, there is no equivalent of manually configuring a replica set or a leader election, unlike a self-managed streaming system you might run yourself.

!
Common Misconception

Adding more shards does not automatically speed up an individual, already-slow consumer application. It increases total stream throughput and allows more parallel consumers, but each consumer instance still needs to be able to keep up with the specific shards it is assigned to read.

A frequent early mistake is under-provisioning shards for bursty, unpredictable workloads and then being surprised by ProvisionedThroughputExceededException errors during traffic spikes. On-demand mode largely absorbs this risk for beginners, while experienced teams running provisioned mode typically build in headroom and use Amazon CloudWatch alarms on shard-level metrics to catch a hot shard before it starts throttling producers.

7Security

Controlling who can write, who can read, and how data is protected at rest and in transit.

Access to a Kinesis stream is governed entirely through IAM policies attached to the identities of your producers and consumers. A producer typically needs only kinesis:PutRecord and kinesis:PutRecords permissions scoped to a specific stream, while a consumer needs read-oriented actions like kinesis:GetRecords, kinesis:GetShardIterator, and kinesis:DescribeStream. Following least privilege here matters in practice: a producer role that can accidentally read the stream, or a consumer role that can accidentally write to it, widens your blast radius for no operational benefit.

Practical Pattern: Encryption at Rest

Kinesis Data Streams supports server-side encryption using AWS Key Management Service (KMS). Once enabled on a stream, every record is automatically encrypted before being stored across Availability Zones and decrypted transparently for authorized consumers — producers and consumers see no difference in code, only in the IAM permissions they now need to use the KMS key.

In transit, all Kinesis API calls travel over HTTPS by default, so data moving between your producer application and the Kinesis service endpoint is encrypted in flight without any extra configuration. For network isolation, Kinesis also supports VPC endpoints, letting producers and consumers running inside a private subnet reach Kinesis without traversing the public internet at all — a common requirement for regulated workloads handling sensitive event data.

S
Shared Responsibility Reminder

AWS secures the Kinesis service itself — the shard infrastructure, replication, and encryption mechanisms. You remain responsible for scoping IAM policies tightly, enabling encryption where required, and deciding what sensitive data, if any, belongs in a record payload in the first place.

8Monitoring, Deployment & Best Practices

How teams operate Kinesis streams day to day instead of just standing one up.

Amazon CloudWatch automatically publishes stream-level and shard-level metrics for every Kinesis stream, including IncomingBytes, IncomingRecords, WriteProvisionedThroughputExceeded, and ReadProvisionedThroughputExceeded. A healthy monitoring setup alarms on sustained throttling metrics, since repeated throttling almost always signals either a hot shard from a poorly chosen partition key, or a stream that has genuinely outgrown its current shard count.

PATTERN-01 Anti-Pattern
The Mistake

Using a low-cardinality partition key, such as a fixed environment name like “prod”, for every record in a high-volume stream.

Why It Fails

Every record with the same partition key hashes to the same shard, so one shard absorbs all the traffic while every other shard sits nearly empty — the stream throttles long before it reaches its theoretical total capacity.

Better Approach

Choose a partition key with high, even cardinality relative to your traffic pattern, such as a customer ID, device ID, or session ID, so records naturally spread across all available shards.

Deployment Considerations

For teams just getting started, on-demand mode removes an entire category of early capacity-planning mistakes and is generally the safer default. As traffic patterns become well understood and predictable, moving to provisioned mode can reduce cost, provided the team commits to actively monitoring shard-level metrics and resharding — splitting hot shards or merging underused ones — as load evolves over time.

Best Practice

Choose High-Cardinality Keys

Pick partition keys that spread evenly across shards to avoid hot-shard throttling.

Best Practice

Checkpoint Frequently

Have consumers checkpoint often enough that a restart reprocesses only a small, acceptable window of records.

Best Practice

Alarm on Throttling Metrics

Set CloudWatch alarms on provisioned-throughput-exceeded metrics so hot shards are caught before producers start failing.

Best Practice

Use Enhanced Fan-Out for Latency-Sensitive Consumers

Register dedicated consumers with Enhanced Fan-Out when multiple applications need low-latency, non-competing reads.

9Real-World Usage Patterns

Where Kinesis actually shows up inside real production systems.

Netflix uses Kinesis-style streaming ingestion to process enormous volumes of viewing and interaction events, feeding recommendation systems that need to reflect what a viewer just watched, not what they watched yesterday. A ride-sharing platform can stream every driver’s GPS ping through Kinesis Data Streams, with one consumer updating a live map for riders, a second consumer feeding a fraud-detection model, and a third streaming raw location data into S3 through Firehose for long-term analytics — three completely different systems, reading the same stream, without any of them slowing the others down.

A financial services company processing card transactions can rely on Kinesis’s per-shard ordering guarantee to ensure that transactions from a single account are always processed in the exact sequence they occurred, which matters enormously for fraud detection logic that depends on transaction order. An IoT manufacturer collecting telemetry from thousands of factory sensors can use Kinesis Data Streams as the front door for that data, with Managed Service for Apache Flink running continuous queries that flag an equipment anomaly within seconds of it happening, rather than discovering it in tomorrow’s batch report.

Everyday Analogy

It’s the difference between a security guard who reviews yesterday’s camera footage each morning, and one watching a live monitor. Kinesis is what turns “we’ll find out tomorrow” into “we already know, and we’re already reacting” — across use cases as different as fraud detection, live dashboards, and equipment monitoring.

10FAQ

Quick, direct answers to the questions beginners ask most often about Amazon Kinesis.
Q1What is the difference between Kinesis Data Streams and Amazon SQS?
SQS delivers each message to one consumer and then deletes it. Kinesis Data Streams retains records for a configurable window and lets many independent consumers read the same data, each at their own pace.
Q2What is a shard, in the simplest possible terms?
A shard is a slice of a stream’s total capacity that holds an ordered sequence of records. More shards means more total throughput and more parallel consumers.
Q3Do I need to write custom code to use Kinesis?
Not always. Kinesis Data Firehose can load streaming data into destinations like S3 or Redshift with zero consumer code, and AWS Lambda can process records directly, without a custom consumer application.
Q4What happens if my consumer application goes down for an hour?
As long as the retention window hasn’t expired, the consumer can resume from its last checkpoint and process the records it missed — no data is lost, though downstream results will lag until it catches up.
Q5How is ordering guaranteed in Kinesis?
Ordering is guaranteed within a single shard, based on the partition key. Records with the same partition key always land in the same shard and are read back in the order they were written.
Q6What is on-demand mode, and should beginners use it?
On-demand mode automatically scales shard capacity based on observed traffic, removing manual capacity planning. It is generally a sensible default for beginners and unpredictable workloads.
Q7Is Kinesis the same as Apache Kafka?
They solve a similar problem — durable, ordered, multi-consumer streaming — but Kinesis is a fully managed AWS service with its own API and shard model, while Apache Kafka is open-source software you can self-manage or run through Amazon Managed Streaming for Apache Kafka (MSK).
Q8Can Kinesis data be permanently stored for long-term analytics?
Kinesis itself is not meant for permanent storage — records expire after the retention window. For long-term storage, a common pattern is streaming through Kinesis Data Firehose into Amazon S3 or a data warehouse like Redshift.

11Summary and Key Takeaways

Key Takeaways

  • Amazon Kinesis Data Streams captures fast-moving data continuously, retains it for a configurable window, and lets multiple independent consumers read it without competing.
  • Data is organized into shards, each with fixed throughput; a record’s partition key determines which shard it lands in and preserves ordering within that shard.
  • Records support replay within the retention window (24 hours to 365 days), a major advantage over one-time-delivery queues.
  • The Kinesis family includes Data Streams (custom pipelines), Firehose (managed delivery), Managed Service for Apache Flink (real-time queries), and Video Streams (media).
  • On-demand mode auto-scales capacity and suits beginners; provisioned mode offers cost control for well-understood, steady traffic.
  • Security relies on scoped IAM permissions, optional KMS encryption at rest, HTTPS in transit, and VPC endpoints for private network access.
  • Choosing a high-cardinality partition key and monitoring throttling metrics in CloudWatch are the two habits that prevent almost all real-world Kinesis problems.