Which statement best explains how IAM policies protect data in DynamoDB?
Think about how permissions control user actions on data.
IAM policies specify permissions for users and roles, controlling who can read, write, or delete data in DynamoDB. This prevents unauthorized users from accessing or modifying data.
Given a user without the dynamodb:Query permission on a table, what will happen when they try to run a query?
aws dynamodb query --table-name Customers --key-condition-expression "CustomerId = :id" --expression-attribute-values '{":id":{"S":"123"}}'
Consider what happens if permissions are missing for an action.
Without the dynamodb:Query permission, the request is denied and AWS returns an AccessDeniedException error, preventing unauthorized data access.
Which IAM policy statement correctly allows a user to read items from the DynamoDB table named Orders?
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "dynamodb:GetItem",
"Resource": "arn:aws:dynamodb:us-east-1:123456789012:table/Orders"
}
]
}Look for the action that reads data and the effect that allows it.
The dynamodb:GetItem action allows reading a single item from the table. The effect must be Allow to grant permission.
You want to grant a user permission to only update the Status attribute of items in the Shipments table. Which IAM policy approach best follows the principle of least privilege?
Think about limiting permissions to only what is necessary.
Using a condition to restrict updates to only the Status attribute ensures the user cannot modify other data, following least privilege.
A user has this IAM policy but cannot read items from the Inventory table. What is the most likely reason?
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["dynamodb:Scan"],
"Resource": "arn:aws:dynamodb:us-east-1:123456789012:table/Inventory"
}
]
}Check which actions the policy allows versus what the user tries to do.
The policy only permits the Scan action. If the user tries to perform GetItem or Query, those actions are denied because they are not included in the policy.