A company has an AWS Lambda function that needs read access to an Amazon S3 bucket that is located in the same AWS account. Which solution will meet these requirements in the MOST secure manner?
A.
Apply an S3 bucket policy that grants read access to the S3 bucket.
B.
Apply an IAM role to the Lambda function. Apply an IAM policy to the role to grant read access to the S3 bucket.
C.
Embed an access key and a secret key in the Lambda function's code to grant the required IAM permissions for read access to the S3 bucket.
D.
Apply an IAM role to the Lambda function. Apply an IAM policy to the role to grant read access to all S3 buckets in the account.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
BECAUSE
1 year, 11 months agothanhch
2 years, 4 months agomgari
3 years agoPaul_101
3 years, 4 months agoFF11
3 years, 4 months agoBlassArun
3 years, 4 months agoAniketh
2 years, 10 months agoBennie
3 years agoSharan_25_v
3 years, 4 months agoRidzV
3 years, 4 months agoshamg
3 years, 5 months agonazree
3 years, 5 months agoSubhankar89
3 years, 5 months ago