
Answer-first summary for fast verification
Answer: Create an IAM role with the minimum required permissions for the Lambda functions to access the specific DynamoDB table, and assign it to the Lambda functions.
To ensure secure and least privilege access for the Lambda functions to access the DynamoDB table, you should create an IAM role with the minimum required permissions for the Lambda functions to access the specific DynamoDB table, and assign it to the Lambda functions. This approach follows the principle of least privilege by granting the Lambda functions access only to the resources they need. Option A provides excessive permissions, while options C and D are not recommended as they involve modifying table policies or using the root account, which can lead to security risks.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
Your company is implementing a new serverless application using AWS Lambda and Amazon DynamoDB. You need to ensure that the Lambda functions have the necessary permissions to access the DynamoDB table. Which of the following steps should you take to achieve this?
A
Create an IAM role with full access to all DynamoDB tables and assign it to the Lambda functions.
B
Create an IAM role with the minimum required permissions for the Lambda functions to access the specific DynamoDB table, and assign it to the Lambda functions.
C
Modify the DynamoDB table policy to allow access from the Lambda service.
D
Use the root account credentials to configure the Lambda functions to access the DynamoDB table.