AWS Certified Developer Associate DVA-C02 Practice Question
A company has developed a new web application deployed on AWS, which includes a set of Lambda functions that interface with DynamoDB tables. The development team wants to ensure that each function has only the permissions necessary to perform its intended tasks with the DynamoDB tables. Which of the following is the BEST approach to manage access control efficiently and securely?
Group Lambda functions by the type of responsibility they have and assign the same IAM role to functions within the same group to simplify management.
Create an individual IAM role for each Lambda function corresponding to the specific operations it needs to perform on the DynamoDB tables, and assign the roles to their respective functions.
Avoid using IAM roles and instead embed the necessary access keys directly within the Lambda function's code to ensure they have sufficient permissions.
Assign all Lambda functions to a single general IAM role that grants full access to all DynamoDB operations to ensure there are no permission-related errors.
Creating individual IAM roles with the minimum necessary permissions and assigning each Lambda function its own role ensures that the principle of least privilege is followed. If a Lambda function’s role is too permissive, it might have access to resources or actions it doesn't need, increasing the risk of accidental or intentional misuse. On the other hand, if the role is not permissive enough, the Lambda function might not be able to perform its required tasks. Grouping Lambda functions by responsibility or not using IAM roles at all are not secure practices and do not adhere to the principle of least privilege.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the principle of least privilege in access control?
Open an interactive chat with Bash
What are IAM roles, and how do they work in AWS?
Open an interactive chat with Bash
Why is it a security risk to embed access keys in code?
Open an interactive chat with Bash
AWS Certified Developer Associate DVA-C02
Security
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access