
Ultimate access to all questions.
A company requires an AWS Lambda function to generate thumbnail images from larger images, necessitating read and write access to an Amazon S3 bucket within the same AWS account. Identify two solutions that would grant the Lambda function the required access to the S3 bucket.
A
Establish an IAM user with programmatic access only, generate a new access key pair, and incorporate these credentials as environment variables in the Lambda function. Subsequently, adjust the Lambda function to utilize these environment variables when interacting with Amazon S3.
B
Generate an Amazon EC2 key pair, securely store the private key in AWS Secrets Manager, and reconfigure the Lambda function to fetch the private key from Secrets Manager for use in communications with Amazon S3.
C
Formulate an IAM role specifically for the Lambda function and attach an IAM policy that grants permissions to access the designated S3 bucket.
D
Design an IAM role for the Lambda function and append a bucket policy to the S3 bucket that permits access, with the Lambda function's IAM role designated as the principal.
E
Create a security group, associate it with the Lambda function, and append a bucket policy to the S3 bucket that allows access via the security group ID.