Q55 — AWS DVA-C02 Ch.3
Question 55 of 100 | ← Chapter 3
A developer created an AWS Lambda function to send notifications via Amazon Simple Notification Service (Amazon SNS) when files larger than 50 MB are uploaded to Amazon S3. The developer deployed and tested the Lambda function using the AWS CLI. However, when a 3,000 MB file was uploaded to the S3 bucket, the Lambda function did not execute. What is the most likely cause of the Lambda function not executing?
- A. S3 event notifications do not activate for files larger than 1,000 MB.
- B. The Lambda function’s resource-based policy does not include permissions required for Amazon S3 to invoke it. ✓
- C. Lambda functions cannot be invoked directly from S3 events.
- D. The S3 bucket must be made public.
Correct Answer: B. The Lambda function’s resource-based policy does not include permissions required for Amazon S3 to invoke it.
Explanation
The most likely cause is a permissions misconfiguration. For S3 to invoke a Lambda function, the function’s resource-based policy (i.e., its permission statement added via AddPermission) must explicitly allow s3.amazonaws.com to invoke it with the correct source ARN. Option A is false: S3 event notifications have no file-size limit. Option C is false: S3 events are a supported Lambda invocation source. Option D is irrelevant: bucket publicness has no bearing on Lambda invocation. Thus, Option B is correct.