Challenge - 5 Problems
DynamoDB IAM Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ service_behavior
intermediate2:00remaining
Which IAM policy allows full access to a specific DynamoDB table?
Given the following IAM policy, what is the effect on the DynamoDB table named OrdersTable?
DynamoDB
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "dynamodb:*",
"Resource": "arn:aws:dynamodb:us-east-1:123456789012:table/OrdersTable"
}
]
}Attempts:
2 left
💡 Hint
Look at the Action and Resource fields carefully.
✗ Incorrect
The policy explicitly allows all DynamoDB actions (dynamodb:*) but only on the specified table resource ARN for OrdersTable.
❓ security
intermediate2:00remaining
Which IAM policy snippet restricts DynamoDB write actions but allows read actions on all tables?
Select the policy snippet that correctly restricts write actions (PutItem, UpdateItem, DeleteItem) but allows read actions (GetItem, Query, Scan) on all DynamoDB tables.
Attempts:
2 left
💡 Hint
Focus on which actions are allowed and which are denied.
✗ Incorrect
Option A allows only read actions on all tables. Option A denies write actions but does not explicitly allow read actions, so it may block all actions if no other policy allows them.
❓ Architecture
advanced2:00remaining
What is the minimum IAM policy to allow a Lambda function to update items in a DynamoDB table named Users?
Choose the policy that grants only the necessary permissions for a Lambda function to update items in the DynamoDB table Users.
Attempts:
2 left
💡 Hint
Minimal permissions mean only what is needed for update.
✗ Incorrect
Option A grants only UpdateItem on the specific table, which is the minimum required. Option A grants all actions, which is more than needed. Option A adds GetItem unnecessarily. Option A grants UpdateItem on all resources, which is too broad.
✅ Best Practice
advanced2:00remaining
Which IAM policy practice improves security when granting DynamoDB access?
Select the best practice for writing IAM policies that grant access to DynamoDB tables.
Attempts:
2 left
💡 Hint
Think about the principle of least privilege.
✗ Incorrect
Option C follows the principle of least privilege by restricting permissions to only necessary tables and actions, improving security.
🧠 Conceptual
expert2:00remaining
What error occurs if an IAM policy denies all DynamoDB actions but a user has a separate policy allowing GetItem on a table?
If a user has two IAM policies: one explicitly denies all DynamoDB actions, and another allows only GetItem on a specific table, what is the effective permission when the user tries to perform GetItem?
Attempts:
2 left
💡 Hint
Remember how AWS IAM evaluates deny and allow statements.
✗ Incorrect
In AWS IAM, explicit deny always overrides any allow. So even if one policy allows GetItem, the explicit deny on all DynamoDB actions blocks it.