Certablo
← Knowledge Base

Amazon Kinesis Data Streams

Real-time record streaming with partition keys, shards, sequence numbers, consumer models, retention, and resharding as the core scaling concepts.

SAA-C03DVA-C02DEA-C01

Visual overview

DATA & EVENT FLOWIngest, buffer or route, transform, query, and present according to the workload
01IngestStreams · events · messages
02DecoupleQueues · topics · buses
03ProcessETL · big data · workflows
04AnalyzeSQL · warehouse · dashboards
Analytics and integration are connected but distinct: one moves and coordinates data or events; the other turns stored or streaming data into answers.
AWS SERVICE MAPReal-time ingestion path

Streams retain ordered shard records that downstream processors can transform and persist for analytics.

Kinesis Data StreamsPartition and retain records
AWS LambdaProcess stream batches
Amazon S3Persist analytical data
EXAM-RELEVANT MECHANICS

Technical reference

Kinesis performance and ordering are driven by partitioning and consumer behavior more than by the stream name itself.

Partition algorithmMD5(partition key) → hash-key range

The resulting hash-key value determines which shard receives a record. Reusing one hot key concentrates traffic.

Ordering scopePer partition key within a shard

Sequence numbers generally increase for records using the same partition key; do not infer a single global ordering across shards.

Parallelism unitShard

Shards divide the hash-key space and establish the natural parallel-processing lanes of a stream.

Consumer modelsShared throughput or enhanced fan-out

Enhanced fan-out gives each registered consumer a dedicated read path instead of sharing the shard's standard read path.

ReshardingSplit / merge shard ranges

Splits increase partition parallelism and merges consolidate adjacent ranges; consumers must follow parent/child shard relationships.

Capacity selectionProvisioned or on-demand modes

Provisioned mode exposes shard capacity planning directly; on-demand options automate more scaling while partition-key distribution still matters.

A durable stream is an ordered set of records split across shards

Amazon Kinesis Data Streams is built for collecting and processing records that arrive continuously, such as application logs, clickstreams, telemetry, and market events. Producers write records to a named stream, and consumers read them independently. Unlike a queue whose message is normally deleted after successful processing, a stream retains records for its configured retention period so different consumers can process the same history at their own position.

The core unit of parallelism is the shard. Every record includes a partition key, and Kinesis maps that key through a hash-key space to a shard. Records with the same partition key therefore follow the same routing and can preserve per-key ordering. A poor partition-key strategy can concentrate traffic into a small portion of the stream even when overall capacity appears sufficient, so evenly distributed, high-cardinality keys are a recurring design consideration.

Consumers choose shared reads or dedicated enhanced fan-out

Kinesis assigns a sequence number after a record is written. Consumers use shard iterators or higher-level libraries such as the Kinesis Client Library to move through records. The KCL coordinates multiple workers and redistributes shard-processing assignments as workers or shards change, which is useful for scaling a consumer application without manually assigning each shard.

Standard consumers share a shard's read-throughput path. Enhanced fan-out registers consumers and gives each registered consumer a dedicated read-throughput path per shard, reducing contention when several low-latency consumers must process the same stream. This is a consumer-side decision; it does not change how producers partition records into shards.

  • Partition keys affect both load distribution and ordering scope.
  • Multiple applications can read the same retained stream independently.
  • Enhanced fan-out is useful when consumers should not compete for the same shard read throughput.
  • KCL coordinates shard ownership among workers and adapts to resharding.

Capacity mode and resharding determine how the stream scales

Kinesis supports capacity modes that shift how explicitly you manage stream capacity. In provisioned mode, shard capacity is a direct design input and resharding operations such as splitting or merging shards change parallel capacity. On-demand modes automate more of this scaling behavior. Regardless of the mode, partition-key distribution remains important because individual keys still map into the stream's partitioning model.

Resharding changes the hash-key ranges owned by shards. A split divides a parent shard's range between child shards; merging combines adjacent shard ranges. Consumers must be able to follow the resulting shard lineage, which KCL is designed to handle. In exam scenarios, select Kinesis when the requirement is a replayable real-time stream with multiple independent consumers, not merely asynchronous task buffering between two components.

Key takeaways

  1. 01

    Kinesis Data Streams retains records so multiple independent consumers can read the same stream.

  2. 02

    Partition keys are hashed into shard ranges and define an important ordering and load-distribution boundary.

  3. 03

    Shards provide parallel read/write capacity; resharding changes that parallelism in provisioned designs.

  4. 04

    Enhanced fan-out provides registered consumers a dedicated read-throughput path per shard.

  5. 05

    Use Kinesis for continuous streaming and replayable processing, not as a drop-in replacement for a task queue.

Official AWS sources

Use these primary AWS resources for the source material behind this article and for deeper reference.