A Kinesis stream must keep each customer's events in order while scaling to many parallel consumers. What should the partition key be?
A.A random UUID per record
Random keys scatter each customer's events across shards — no order.
B.Customer ID — same key routes to the same shard preserving per-customer order
Correct. Key affinity preserves per-key order.
C.A timestamp
Timestamps hash badly (hot shard on recent data).
D.The event type
Few distinct values = skewed shard load.
Why this answer
Partition keys hash to shards; records with the same key land on the same shard in order — customer ID gives per-customer ordering with good distribution across shards. Random keys lose ordering; timestamps/types create hot shards.
Correct answer: B · Last reviewed 2026-11-04
Official AWS references
Practice this interactively
Answer without seeing the solution first in the Ingestion & ETL practice session.
Practice Ingestion & ETL