An S3-triggered Lambda function reads from incoming/ and writes results to processed/ in the same bucket. Notifications can be duplicated or processed concurrently; which design prevents output-triggered recursion and suppresses concurrent duplicate processing of the same object version?
Show the answer
Correct answerB. Filter notifications to incoming/; conditionally claim bucket, key, and version ID in DynamoDB before processing.
AWhy not this: Concurrent invocations can both read an absent record and then both write it, allowing duplicate processing.
BWhy this is right: The prefix excludes outputs, and an atomic conditional claim allows only one invocation to claim a given object version.
CWhy not this: Execution-environment memory is not shared across concurrent Lambda environments, so separate invocations can process the same version.
DWhy not this: Filtering to processed/ selects output objects instead of the incoming objects that require processing.
An incoming/ prefix filter excludes output objects. A DynamoDB conditional write provides an atomic claim for each object version, suppressing concurrent duplicates; a separate read followed by an unconditional write permits a race.