Question 231 · 1017 in bank
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?
Show answer
Answer: B
Explanation
This solution satisfies the needs in the most secure manner: • An IAM role provides temporary credentials to the Lambda function to access AWS resources. The function does not have persistent credentials. • The IAM policy grants least privilege access by specifying read access only to the specific S3 bucket needed. Access is not granted to all S3 buckets. • If the Lambda function is compromised, the attacker would only gain access to the one specified S3 bucket. They would not receive broad access to resources.
Source: Adapted from community discussion — kruasan