
Ultimate access to all questions.
You are working on a project that requires the use of AWS Lambda functions to process data stored in an S3 bucket. The Lambda functions need to access the S3 bucket, but you want to ensure that the access is secure and follows the principle of least privilege. Which of the following steps should you take to achieve this?
A
Create an IAM role with full access to all S3 buckets and assign it to the Lambda function.
B
Create an IAM role with access to the specific S3 bucket required by the Lambda function and assign it to the Lambda function.
C
Create an IAM user with access to the specific S3 bucket required by the Lambda function and share the access key with the Lambda function.
D
Use the root account credentials to access the S3 bucket from the Lambda function.