1.Kinesis Core Vocabulary: Shards, Partition Keys, Ordering, Retention, Replay
A Kinesis data stream is a set of shards; each shard holds an ordered sequence of records. Every record carries a partition key, and Kinesis hashes that key to decide which shard the record lands on. Records with the same partition key always land on the same shard, in the order they arrived. A stream keeps records for 24 hours by default (up to 365 days), so a consumer can replay history instead of only seeing new data.
Key features
- A stream is a set of shards; each shard is a fixed unit of capacity with its own sequence of records
- A partition key (a string, max 256 characters) is hashed with MD5 to pick which shard a record goes to
- Ordering is guaranteed only within a shard, for records sharing the same partition key — not across the whole stream
- Retention defaults to 24 hours after a stream is created; it can be raised up to 8,760 hours (365 days)
- Because records stay in the stream for the retention window, a new or restarted consumer can replay from an earlier point instead of only reading new arrivals
- A data blob inside a record can be up to 1 MB
- Record + partition key
- leads to MD5 hash of partition key (hashed)
- MD5 hash of partition key
- leads to Shard (ordered sequence) (maps to a hash key range)
- Shard (ordered sequence)
Signature
Stream = set of shards · partition key → MD5 hash → shard · order guaranteed per-shard only
A stream is a set of shards; a partition key's hash decides the shard. Ordering holds only within a shard, for one partition key. Retention defaults to 24 hours, extendable to 365 days — that window is what makes replay possible.