An engineer is configuring an S3 event notification to invoke a Lambda function in the same account and Region. Which permission allows S3 to invoke the function?
Show the answer
Correct answerD. Allow the S3 service principal to invoke the function in its resource-based policy.
AWhy not this: Bucket write permission governs object access, not invocation of a Lambda function.
BWhy not this: Object-read permission lets function code retrieve data but does not authorize S3 to invoke the function.
CWhy not this: The uploader creates the object, but S3 is the principal that invokes the function for the notification.
DWhy this is right: The function's resource-based policy grants S3 permission to invoke it and can restrict the source bucket and account.
The Lambda resource-based policy must allow the S3 service principal to invoke the function, typically restricted by source bucket and account. The execution role governs actions performed by function code, not S3's permission to invoke it.