A company needs a new REST API that can return information about the contents of an Amazon S3 bucket, such as a count of the objects stored in it. The company has decided that the new API should be written as a microservice using AWS Lambda and Amazon API Gateway. How should the Developer ensure that the microservice has the necessary access to the Amazon S3 bucket, while adhering to security best practices?
A) Create an IAM user that has permissions to access the Amazon S3 bucket, and store the IAM user credentials in the Lambda function source code.
B) Create an IAM role that has permissions to access the Amazon S3 bucket and assign it to the Lambda function as its execution role.
C) Create an Amazon S3 bucket policy that specifies the Lambda service as its principal and assign it to the Amazon S3 bucket.
D) Create an IAM role, attach the AmazonS3FullAccess managed policy to it, and assign the role to the Lambda function as its execution role.
Correct Answer:
Verified
Q45: A company has an AWS CloudFormation template
Q46: An organization is storing large files in
Q47: Where can PortMapping be defined when launching
Q48: The upload of a 15 GB object
Q49: A company needs a fully-managed source control
Q51: A Developer is writing an imaging micro
Q52: What does an Amazon SQS delay queue
Q53: A Developer has developed a web application
Q54: An application running on Amazon EC2 instances
Q55: An application is expected to process many
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents