DVA-C03 practice question: Streaming data with Kinesis (2 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.
A Lambda function reads an Amazon Kinesis data stream through an event source mapping with default settings.
One malformed record makes each attempt fail, so its shard stops advancing and the records behind it wait. The team wants the rest of the data to keep flowing, and it wants the malformed records kept for later investigation.
Which TWO changes should the developer make? (Choose two.)
Choose two answers.
AA. Turn on BisectBatchOnFunctionError, so that a failing batch is split in half and retried.
BB. Set a finite MaximumRetryAttempts and an on-failure destination such as an SQS queue.
CC. Configure a dead-letter queue in the function's asynchronous invocation settings.
DD. Increase the visibility timeout on the stream so the function has longer per batch.
EE. Add more shards so that the failing shard receives fewer records.
C. Wrong: That setting applies to asynchronous invocations. A stream event source mapping uses its own on-failure destination instead.
D. Wrong: Visibility timeout is an Amazon SQS setting. Kinesis has no such setting, and a longer wait would not remove the bad record from the shard.
E. Wrong: Resharding does not remove the malformed record. The record stays in its shard, which still stalls until the record is handled.
Explanation
With default settings a stream mapping retries a failing batch without limit, so one bad record blocks its shard. Bisecting the batch isolates the bad record, and a finite retry count with an on-failure destination lets Lambda discard it, keep the shard moving and keep the details for review.
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 →