AWS Certified Developer – Associate — Question 233

A developer is creating an AWS Lambda function to process streaming data from an Amazon Kinesis data stream. When the Lambda function parses the data and encounters a malformed record from the stream, the Lambda function exits with an error.

The developer is observing duplicate records downstream from the function. When the developer uses a different client to examine the Kinesis data stream output, no duplicate records are visible in the stream.

What is the reason for the duplicate records?

Answer options

Correct answer: C

Explanation

The correct answer is C because when the Lambda function encounters an unhandled error, the Lambda service retries processing the same record, leading to duplicates. Option A is incorrect because it does not directly cause duplicates; advancing the pointer would prevent reprocessing. Option B is not relevant here, as asynchronous invocation does not explain the observed behavior. Option D is also wrong since the issue is related to error handling, not the function's processing speed.