Lambda for data processing: DEA-C01 study notes and practice questions
What to know about Lambda for data processing for the DEA-C01 exam, from the Data Ingestion and Transformation domain (34% of the exam guide), then 1 free question to test it. Part of the DEA-C01 study guide.
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.
AA. Increase the function's timeout and memory, so that the function can process the malformed record before the batch is retried.
BB. Set the maximum retry attempts to unlimited, so that the function keeps retrying the batch until the malformed record succeeds.
CC. Turn on bisect on error, cap retry attempts and record age, and send discarded batch details to an on-failure queue.
DD. 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.
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.
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 →