Deployment, Provisioning, and Automation

An S3 notification invokes a Lambda function for object creation, and the function writes processed files to the same bucket. How should the engineer prevent recursive invocations while continuing to process new uploads?

Show the answer

Correct answerB. Filter notifications to an input prefix and write outputs elsewhere.

AWhy not this: A longer timeout changes execution duration, not which object writes trigger the function.

BWhy this is right: Output objects outside the notification's input prefix do not match the trigger.

CWhy not this: Reserved concurrency limits simultaneous executions; output objects can still trigger subsequent invocations.

DWhy not this: Versioning retains object versions but does not stop object-created notifications.

Filtering notifications to an input prefix and writing outputs outside that prefix prevents the function's writes from triggering itself. Reserved concurrency limits simultaneous executions but does not break the notification loop.