An AWS Lambda function requires read access to an Amazon S3 bucket and requires read/write access to an Amazon DynamoDB table. The correct IAM policy already exists. What is the MOST secure way to grant the Lambda function access to the S3 bucket and the DynamoDB table?
A) Attach the existing IAM policy to the Lambda function.
B) Create an IAM role for the Lambda function. Attach the existing IAM policy to the role. Attach the role to the Lambda function.
C) Create an IAM user with programmatic access. Attach the existing IAM policy to the user. Add the user access key ID and secret access key as environment variables in the Lambda function.
D) Add the AWS account root user access key ID and secret access key as encrypted environment variables in the Lambda function.
Correct Answer:
Verified
Q435: A microservices application is deployed across multiple
Q436: A developer is building an AWS Lambda
Q437: A company has an application that runs
Q438: A developer is troubleshooting the permissions of
Q439: A developer is troubleshooting connectivity issues between
Q441: A developer is creating an event handling
Q442: A developer is attempting to use the
Q443: An organization is using Amazon API Gateway
Q444: A developer is creating AWS CloudFormation templates
Q445: A developer has created a Node.js web
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