Service · Analytics · Builds on CLF-C02
Amazon Kinesis
Real-time streams that you size in shards. Partition keys decide order and balance.
You know from Cloud Practitioner
- Kinesis Data Streams captures a stream for your own applications to process.
- Firehose delivers streams to S3, Redshift or OpenSearch with no code.
- Kinesis Video Streams carries live video.
Write per shard
- 1 MB/s or 1,000 records/s
Read per shard
- 2 MB/s, shared by consumers
Enhanced fan-out
- 2 MB/s per consumer per shard
Retention
- 24 hours up to 365 days
Capacity mode
- Provisioned shards or on-demand
| Limit | Value |
|---|---|
| Write per shard | 1 MB/s or 1,000 records/s |
| Read per shard | 2 MB/s, shared by consumers |
| Enhanced fan-out | 2 MB/s per consumer per shard |
| Retention | 24 hours up to 365 days |
| Capacity mode | Provisioned shards or on-demand |
What it is
A data stream is a set of shards. Each shard accepts up to 1 MB per second or 1,000 records per second of writes, and serves up to 2 MB per second of reads. A stream with five shards takes up to 5 MB per second. In provisioned mode you choose the number of shards. In on-demand mode Kinesis adds and removes shards for you. Producers can use the Kinesis Producer Library (KPL) to batch and send records. Consumers can use the Kinesis Client Library (KCL), which shares a stream’s shards among several workers.
What it is
Every record has a partition key. Records with the same key go to the same shard, in order. If most records share a few keys, one shard becomes hot and producers get throttled while other shards sit idle. Use a key with many different values. By default all consumers share a shard’s 2 MB per second. Enhanced fan-out gives each registered consumer its own 2 MB per second per shard. Data stays in the stream for 24 hours by default, and up to 365 days, so consumers can replay it.
Remember
- Per shard: 1 MB/s or 1,000 records/s in, 2 MB/s out.
- Provisioned (you set shards) or on-demand (automatic).
- Retention 24 hours to 365 days. Consumers can replay.
- Same partition key goes to the same shard, in order. A skewed key makes a hot shard.
- Enhanced fan-out: a dedicated 2 MB/s per consumer per shard.
Remember
- Kinesis Video Streams ingests video from cameras and devices for analysis.
On the exam
- “ProvisionedThroughputExceeded errors” points to more shards, or a better partition key.
- “Several applications read the same stream without slowing each other” points to enhanced fan-out.
- “Replay the last week of events” points to Kinesis Data Streams with longer retention.
- “Ordered processing per customer” points to the customer ID as partition key.
Do not mix it up with
Amazon Data FirehoseManaged delivery of streaming data to S3, Redshift, OpenSearch and more. Managed Flink analyzes streams.
Amazon Managed Streaming for Apache Kafka (Amazon MSK)Managed Apache Kafka. Choose it when applications already use Kafka.
Amazon Simple Queue Service (Amazon SQS)The settings that decide behavior: visibility timeout, long polling, delay, retention, DLQs, and scaling on queue depth.