MLA-C01 Practice Question 51: Kinesis Hot Shard Throttling
AWS Certified Machine Learning Engineer – Associate (MLA-C01) · Test 6 · question 1 of 10
A retail chain streams point-of-sale events into an Amazon Kinesis data stream that feeds a demand-forecasting feature pipeline. The stream is in provisioned mode with 16 shards, and producers use the store's region code as the partition key. There are four regions, and the Northeast region generates about 70% of all events. During sales, producers receive ProvisionedThroughputExceeded errors even though the stream's total incoming data is under 40% of its combined shard capacity.
What should the team do to stop the write errors?
Show answer and explanation
Answer:
Kinesis hashes the partition key to pick a shard, so every record with the same key lands on the same shard. With only four region codes, at most four of the 16 shards receive any data, and the Northeast shard takes 70% of the traffic. Each shard accepts at most 1 MB per second or 1,000 records per second for writes, so that one shard throttles while the stream as a whole sits mostly idle. A high-cardinality partition key spreads the writes evenly across all shards (option C).
- A is wrong because extra shards do not help a key that always hashes to a single shard. The new shards would sit as idle as the 12 unused ones do today. - B is wrong because enhanced fan-out adds dedicated *read* throughput for consumers. The errors come from producers *writing* to one overloaded shard. - D is wrong because on-demand mode splits shards by hash range but cannot split a single partition key's traffic. AWS notes that on-demand streams still throw write exceptions when one key exceeds a shard's 1 MB/s or 1,000 records/s limit.
Reference: Choose the right mode to stream in - Amazon Kinesis Data Streams