Course menuDVA-C03

Exams / DVA-C03 / Streaming data with Kinesis / Question 1

DVA-C03 practice question: Streaming data with Kinesis (1 of 2)

Development with AWS Services A free question from our original DVA-C03 practice exam. Try it, then open the answer to see why each option is right or wrong.

Last verified against current AWS documentation ·How we write our questions

A smart-meter platform writes readings to an Amazon Kinesis data stream with 20 shards.

Each producer sets the partition key to the region name, and there are only four regions. The stream shows write throttling on a few shards, while the other shards are nearly idle and total traffic is far below the stream capacity.

What should the developer change?

Choose one answer.

  1. A. Use the meter ID as the partition key, since every meter has its own value.
  2. B. Double the stream to 40 shards, so that each shard receives fewer records.
  3. C. Change the producers from PutRecords to PutRecord, so that each record is sent in its own call.
  4. D. Use the region name together with the year and month as the partition key, so the key changes every month.
Show the answer and explanation

Answer: A

  • A. Right: Correct. Kinesis hashes each partition key to choose a shard, so many distinct meter IDs spread the writes across the whole stream instead of four shards. Learn more: Kinesis Data Streams key concepts (opens in a new tab)
  • B. Wrong: With only four partition key values, the records still land on at most four shards. The extra shards would sit idle.
  • C. Wrong: One record per call changes how requests are batched, not which shard each record goes to. The same few shards stay overloaded.
  • D. Wrong: This adds little variety. In any given month there are still only four key values, so the same few shards remain hot.

Explanation

Kinesis hashes each partition key to choose a shard, so all records with the same key go to the same shard. Four key values mean at most four busy shards, however many shards the stream has. A key with many distinct values spreads the writes evenly across the stream.

Study

Keep practicing

Answer questions with a score at the end, or practice just this topic with the explanation after each one. No sign-up needed.

Want more on Streaming data with Kinesis? The 5 full-length practice sets have 10 more Streaming data with Kinesis questions, 390 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets