AWS Certified Data Engineer - Associate (DEA-C01) free question 1 / 10 · Domain 1: Data Ingestion and Transformation
A producer writes to a Kinesis data stream and keeps receiving throughput exceptions, although the stream's total capacity is far from used. Metrics show that one shard is saturated and the others are almost idle, because every record carries the same partition key. What should the team do?
- Poll DescribeStream several times per second to find the busy shard and write to it later
- Call flushSync() after the write operations so that buffered records reach the saturated shard without delay
- Extend the retention period of the stream so that writes that were rejected are kept until the shard has free capacity
- Choose a partition key with many different values so that puts are distributed evenly across the shards
Show the answer and explanation
Answer: D
Why this is correct
The page lists service limits as the first cause of slow writes and tells you to check whether the producer gets throughput exceptions. When capacity is available but some puts still fail, the next step is the partition key: one key that keeps hitting its shard limit while the rest are idle is the pattern described. The fix is a partition key that distributes put operations evenly across all shards.
Why the other options are wrong
"Extend the retention period of the stream so that writes that were rejected are kept until the shard has free capacity" … The terminology page defines the retention period as the time records are accessible after they are added to the stream. A write that is throttled is rejected before it is stored, and retention has no effect on the per-shard write limit.
"Call flushSync() after the write operations so that buffered records reach the saturated shard without delay" … flushSync() is meant for shutdown, to make sure buffered records are sent before the application ends. Calling it after each write adds roughly 500 ms of latency per write and does nothing for a hot shard.
"Poll DescribeStream several times per second to find the busy shard and write to it later" … DescribeStream is itself limited, to 10 calls per second. Looking at the shard more often does not change where records go, because the partition key decides the shard.
Key points
The page tells you to check whether the producer throws throughput exceptions and which API operations are throttled. The operations CreateStream, DeleteStream, ListStreams, GetShardIterator, and MergeShards are limited to 5 calls per second.