Q28 — AWS DVA-C02 Ch.2

Question 28 of 100 | ← Chapter 2

A company has an application that uploads files to an Amazon S3 bucket. Whenever a new file arrives, an S3 event notification triggers an AWS Lambda function to process it. The Lambda function code is expected to work correctly. However, when developers inspect Lambda logs, they observe duplicate invocations for each file. What causes the duplicate invocations?

Correct Answer: B. The Lambda function fails intermittently, causing Lambda to retry the invocation.

Explanation

Option B is correct: if the Lambda function fails (e.g., throws an unhandled exception or times out), Lambda retries the invocation up to two additional times by default—resulting in duplicate log entries per file. Option A is invalid: incorrect bucket targeting would prevent Lambda from triggering at all. Option C is misleading: S3 event notifications are at-least-once delivery, but duplicates are rare and typically stem from downstream failures—not inherent S3 behavior. Option D is irrelevant: log fragmentation does not cause duplicate Lambda invocations.