Course menuDEA-C01

Exams / DEA-C01 / Lambda for data processing / Question 1

DEA-C01 practice question: Lambda for data processing

Data Ingestion and Transformation A free question from our original DEA-C01 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 clinic network's Lambda function reads a Kinesis data stream in batches of 500 records. One malformed record causes the function to fail, and Lambda retries the whole batch. The shard stalls for hours, and the records behind the bad record are not processed.

The team needs the good records to keep flowing, the malformed record to be kept for investigation, and no data to be lost without a trace. The stream and the function code should stay as they are.

Which change meets these requirements?

Choose one answer.

  1. A. Increase the function's timeout and memory, so that the function can process the malformed record before the batch is retried.
  2. B. Set the maximum retry attempts to unlimited, so that the function keeps retrying the batch until the malformed record succeeds.
  3. C. Turn on bisect on error, cap retry attempts and record age, and send discarded batch details to an on-failure queue.
  4. D. Move the stream's records to an Amazon SQS queue first, and have the function read from the queue instead of the stream.
Show the answer and explanation

Answer: C

  • A. Wrong: A malformed record fails the same way no matter how much time or memory the function has. The timeout and memory changes do not stop the retries or keep the shard moving.
  • B. Wrong: An unlimited retry count keeps the shard blocked on a record that cannot succeed. The good records behind it still wait, and the stall gets longer.
  • C. Right: Correct. Bisecting splits a failed batch so that the bad record is isolated while the good records are processed. The retry limit and record age stop the stall, and the on-failure destination keeps the details of the discarded batch for investigation. Learn more: Using Lambda to process records from Amazon Kinesis Data Streams (opens in a new tab)
  • D. Wrong: A queue can hold the malformed record, but the function still fails on it and retries it. Moving the consumer also changes the stream design that the team wants to keep.

Explanation

A failed Kinesis batch blocks its shard until Lambda stops retrying it, so a single bad record can stall everything behind it. Bisecting the batch, limiting retries and record age, and sending the discarded batch details to an on-failure destination isolate the bad record and keep the stream moving. More time, more memory or unlimited retries leave the blockage in place.

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 Lambda for data processing? The 5 full-length practice sets have 8 more Lambda for data processing questions, 325 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets