Monitoring and Logging
A Lambda function processes logs uploaded under incoming/ in an S3 bucket and writes processed copies under processed/ in the same bucket. Which S3 notification configuration invokes the function for new input files while avoiding recursive invocations?
Show the answer
Correct answerA. Use ObjectCreated events with the prefix incoming/.
AWhy this is right: The incoming/ prefix selects input uploads and excludes objects written under processed/.
BWhy not this: ObjectRemoved notifications respond to deletions rather than new log uploads.
CWhy not this: A suffix shared by input and output logs does not exclude the function's own writes.
DWhy not this: The processed/ prefix selects output objects rather than the input files that require processing.
Filtering ObjectCreated notifications to incoming/ invokes Lambda for uploaded inputs but excludes its outputs under processed/. A .log suffix filter can still match processed log files and cause recursive invocations.