AWS Certified Developer – Associate — Question 388
A company has an application that writes files to an Amazon S3 bucket. Whenever there is a new file, an S3 notification event invokes an AWS Lambda function to process the file. The Lambda function code works as expected. However, when a developer checks the Lambda function logs, the developer finds that multiple invocations occur for every file.
What is causing the duplicate entries?
Answer options
- A. The S3 bucket name is incorrectly specified in the application and is targeting another S3 bucket.
- B. The Lambda function did not run correctly, and Lambda retried the invocation with a delay.
- C. Amazon S3 is delivering the same event multiple times.
- D. The application stopped intermittently and then resumed, splitting the logs into multiple smaller files.
Correct answer: B
Explanation
When Amazon S3 invokes an AWS Lambda function asynchronously, Lambda automatically retries the execution up to two more times if the function encounters an error or times out. This built-in retry mechanism explains why multiple invocation logs are generated for a single file upload if an execution fails. Incorrect bucket configurations or S3 delivering duplicate events are not the standard causes for this behavior.