ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 160 - DVA-C02 discussion

Report
Export

An AWS Lambda function requires read access to an Amazon S3 bucket and requires read/write access to an Amazon DynamoDB table The correct 1AM 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 1AM policy to the Lambda function.
Answers
A.
Attach the existing 1AM policy to the Lambda function.
B.
Create an 1AM role for the Lambda function Attach the existing 1AM policy to the role Attach the role to the Lambda function
Answers
B.
Create an 1AM role for the Lambda function Attach the existing 1AM policy to the role Attach the role to the Lambda function
C.
Create an 1AM user with programmatic access Attach the existing 1AM policy to the user. Add the user access key ID and secret access key as environment variables in the Lambda function.
Answers
C.
Create an 1AM user with programmatic access Attach the existing 1AM 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
Answers
D.
Add the AWS account root user access key ID and secret access key as encrypted environment variables in the Lambda function
Suggested answer: B

Explanation:

Principle of Least Privilege:Granting specific permissions through an IAM role is more secure than directly attaching policies to a function or using root user credentials.

IAM Roles for Lambda:Designed to provide temporary credentials to Lambda functions, enhancing security.

Reusability:The existing IAM policy ensures the correct S3 and DynamoDB access is granted.

IAM Roles for Lambda Documentation:https://docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html

IAM Best Practices:https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html

asked 16/09/2024
Tim Baas
42 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first