AWS Data Engineer DEA-C01 · Data Operations and Support · medium

An AWS Lambda function processes batches of 100 records from an Amazon Kinesis Data Stream. Occasionally, a single malformed poison-pill record causes the Lambda function to throw an unhandled exception, retrying the entire batch indefinitely and blocking the shard. Which two configurations allow the Lambda event-source mapping to isolate the bad record to an SQS Dead-Letter Queue (DLQ) without losing valid records in the same batch? (Select two.)

Published · Last updated · checked before publication — how we verify questions

Options

  • ASet MaximumRetryAttempts to -1 (infinite retries) with no DLQ
  • BEnable 'Bisect batch on function error' on the event-source mappingCorrect answer
  • CConfigure an Amazon SQS Dead-Letter Queue as the On-failure destinationCorrect answer
  • DDelete and recreate the entire Kinesis stream whenever an error occurs

Answers: B. Enable 'Bisect batch on function error' on the event-source mapping; C. Configure an Amazon SQS Dead-Letter Queue as the On-failure destination

On a Kinesis-to-Lambda event-source mapping, enabling Bisect batch on function error (BisectBatchOnFunctionError: true) splits a failing batch in half recursively to isolate the exact poison-pill record (B), and configuring an On-failure destination (SQS DLQ or SNS topic) with MaximumRetryAttempts / ReportBatchItemFailures sends the isolated failed record metadata to the DLQ so shard processing continues (C).

Why the other options are wrong

  • A. Set MaximumRetryAttempts to -1 (infinite retries) with no DLQ — Infinite retries with no bisect or DLQ is the default behavior that blocks the shard forever on a poison-pill record.
  • D. Delete and recreate the entire Kinesis stream whenever an error occurs — Deleting the stream destroys all in-flight data across all shards.

All Data Operations and Support questions and the topic overview →

AWS and Amazon Web Services are trademarks of Amazon.com, Inc. PrepIQ Hub is not affiliated with, endorsed by, or sponsored by Amazon Web Services.