
Answer-first summary for fast verification
Answer: Change the Resource element to "arn:aws:s3:::DOC-EXAMPLE-BUCKET/*".
The correct answer is C. In the bucket policy, the Resource element should include a wildcard (*) at the end to specify all objects within the bucket. By changing the Resource element to "arn:aws:s3:::DOC-EXAMPLE-BUCKET/*", it ensures that all objects within the specified S3 bucket can be accessed by the Lambda function. The current error is likely due to the policy not correctly targeting the objects within the bucket.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A security engineer is troubleshooting an AWS Lambda function named MyLambdaFunction, which is experiencing errors when attempting to read objects from an Amazon S3 bucket named DOC-EXAMPLE-BUCKET. The S3 bucket currently has a bucket policy in place. To resolve the issue and allow the Lambda function to successfully read the objects from the S3 bucket, what specific modification should be made to the bucket policy?
A
Remove the Condition element. Change the Principal element to the following:
B
Change the Action element to the following:
C
Change the Resource element to "arn:aws:s3:::DOC-EXAMPLE-BUCKET/*".
D
Change the Resource element to "arn:aws:lambda:::function:MyLambdaFunction". Change the Principal element to the following:
No comments yet.