An IAM policy is a set of rules that define what actions are allowed or denied on AWS resources for users or roles.
Click to reveal answer
beginner
Which AWS service does the IAM policy control in this topic?
The IAM policy controls access to DynamoDB, which is a NoSQL database service.
Click to reveal answer
beginner
What is the purpose of the "Action" field in an IAM policy for DynamoDB?
The "Action" field specifies which DynamoDB operations (like reading or writing data) are allowed or denied.
Click to reveal answer
intermediate
Why is it important to specify the "Resource" in an IAM policy?
Specifying the "Resource" limits the policy to certain DynamoDB tables or indexes, improving security by not allowing access to everything.
Click to reveal answer
beginner
What does the "Effect" field in an IAM policy do?
The "Effect" field determines whether the policy allows or denies the specified actions on the resources.
Click to reveal answer
Which IAM policy "Effect" value allows access to DynamoDB actions?
AIgnore
BAllow
CDeny
DBlock
✗ Incorrect
The "Allow" effect grants permission to perform the specified actions.
What does the "Resource" field in a DynamoDB IAM policy specify?
AThe AWS region
BThe password
CThe user name
DThe DynamoDB table or index to access
✗ Incorrect
The "Resource" field limits the policy to specific DynamoDB tables or indexes.
Which of these is a valid DynamoDB action in an IAM policy?
As3:PutObject
Bec2:StartInstances
Cdynamodb:PutItem
Dlambda:InvokeFunction
✗ Incorrect
"dynamodb:PutItem" is an action to add or replace an item in a DynamoDB table.
If you want to deny all access to DynamoDB, what should the "Effect" be?
ADeny
BAllow
CBlock
DReject
✗ Incorrect
The "Deny" effect explicitly blocks the specified actions.
Why should IAM policies be as specific as possible?
ATo improve security by limiting access
BTo make policies easier to read
CTo allow all users full access
DTo speed up AWS services
✗ Incorrect
Specific policies reduce risk by granting only the needed permissions.
Explain the key components of an IAM policy for DynamoDB and their roles.
Think about what each part controls: allow or deny, what actions, and on which tables.
You got /4 concepts.
Describe why it is important to limit IAM policy permissions when working with DynamoDB.
Consider what could happen if permissions are too broad.
You got /4 concepts.
Practice
(1/5)
1. What does the Action element specify in an IAM policy for DynamoDB?
easy
A. The allowed or denied DynamoDB operations
B. The AWS region where the table is located
C. The encryption method used by the table
D. The billing mode of the DynamoDB table
Solution
Step 1: Understand the role of Action in IAM policies
The Action element defines which DynamoDB operations (like read, write) are allowed or denied.
Step 2: Differentiate from other policy elements
Other elements like Resource specify the table, but Action controls what can be done.
Final Answer:
The allowed or denied DynamoDB operations -> Option A
Quick Check:
Action = Allowed/Deny operations [OK]
Hint: Action controls what operations are allowed or denied [OK]
Common Mistakes:
Confusing Action with Resource
Thinking Action specifies table location
Mixing Action with encryption or billing settings
2. Which of the following is the correct syntax to specify a DynamoDB table resource ARN in an IAM policy?
easy
A. "Resource": "arn:aws:s3:::mybucket"
B. "Resource": "arn:aws:dynamodb:us-east-1:123456789012:table/MyTable"
C. "Resource": "arn:aws:dynamodb:us-east-1:123456789012:table"
D. "Resource": "arn:aws:dynamodb:us-east-1:123456789012:database/MyTable"
Solution
Step 1: Identify correct ARN format for DynamoDB table
The ARN format for a DynamoDB table is: arn:aws:dynamodb:<region>::table/.
Step 2: Compare options to the correct format
"Resource": "arn:aws:dynamodb:us-east-1:123456789012:table/MyTable" matches the correct format exactly. "Resource": "arn:aws:s3:::mybucket" is for S3, C misses table name, D uses wrong resource type.
Final Answer:
"Resource": "arn:aws:dynamodb:us-east-1:123456789012:table/MyTable" -> Option B
Quick Check:
Resource ARN for DynamoDB table = "Resource": "arn:aws:dynamodb:us-east-1:123456789012:table/MyTable" [OK]
Hint: DynamoDB table ARN ends with 'table/YourTableName' [OK]
Common Mistakes:
Using S3 ARN format instead of DynamoDB
Omitting the table name in ARN
Using 'database' instead of 'table' in ARN
3. Given this IAM policy snippet, what DynamoDB actions are allowed?
The ARN ends with 'table' but does not specify the table name, so it does not point to any specific table.
Step 2: Understand impact of incomplete ARN
Without a full ARN including the table name, the policy does not grant access to any resource.
Final Answer:
Resource ARN is incomplete; missing table name -> Option A
Quick Check:
Resource ARN must include table name [OK]
Hint: Resource ARN must specify full table name [OK]
Common Mistakes:
Thinking Action must be an array always
Confusing Effect Allow with Deny
Assuming Condition is required for access
5. You want to create an IAM policy that allows a user to read from any DynamoDB table in your account but only write to a specific table named 'Inventory'. Which policy setup is correct?