Fine-grained access control lets you set detailed permissions on who can access specific items or attributes in a DynamoDB table, not just the whole table.
Click to reveal answer
intermediate
How does DynamoDB implement fine-grained access control?
It uses IAM policies with condition keys that check item attributes, so you can allow or deny access based on data values in the table.
Click to reveal answer
intermediate
Which IAM condition key is commonly used for fine-grained access control in DynamoDB?
The condition key 'dynamodb:LeadingKeys' is used to restrict access to items with specific partition key values.
Click to reveal answer
beginner
Why is fine-grained access control useful in real life?
It helps protect sensitive data by letting users see or change only the data they are allowed to, like employees accessing only their own records.
Click to reveal answer
advanced
Can fine-grained access control restrict access to specific attributes in DynamoDB items?
Yes, you can use IAM policies with the 'dynamodb:Attributes' condition to allow or deny access to certain attributes within items.
Click to reveal answer
What does fine-grained access control in DynamoDB allow you to do?
AControl access only to the entire table
BControl access to specific items or attributes
CControl access to AWS services outside DynamoDB
DControl network traffic to DynamoDB
✗ Incorrect
Fine-grained access control lets you set permissions on specific items or attributes, not just the whole table.
Which IAM condition key restricts access based on partition key values?
Adynamodb:Select
Bdynamodb:Attributes
Cdynamodb:LeadingKeys
Ddynamodb:ReturnConsumedCapacity
✗ Incorrect
The 'dynamodb:LeadingKeys' condition key is used to restrict access to items with specific partition key values.
What is a common use case for fine-grained access control?
AAllowing users to access only their own data
BBacking up the entire database
CIncreasing read capacity units
DEncrypting data at rest
✗ Incorrect
Fine-grained access control is often used to let users access only their own records or data.
Can fine-grained access control be used to restrict access to specific attributes in an item?
ANo, it only works at the item level
BNo, it only controls table-level access
CYes, but only for indexes
DYes, using 'dynamodb:Attributes' condition key
✗ Incorrect
You can restrict access to specific attributes using the 'dynamodb:Attributes' condition key in IAM policies.
Which AWS service is used to define fine-grained access control policies for DynamoDB?
AAWS IAM
BAWS Lambda
CAmazon S3
DAmazon EC2
✗ Incorrect
AWS IAM is used to create policies that define fine-grained access control for DynamoDB.
Explain how fine-grained access control works in DynamoDB and why it is important.
Think about how you can let users see only their own data.
You got /4 concepts.
Describe a real-life scenario where fine-grained access control in DynamoDB would be useful.
Imagine a company where employees should only see their personal information.
You got /4 concepts.
Practice
(1/5)
1. What is the main purpose of fine-grained access control in DynamoDB?
easy
A. To automatically backup data
B. To speed up query performance
C. To restrict access to specific items based on keys
D. To encrypt data at rest
Solution
Step 1: Understand fine-grained access control concept
Fine-grained access control limits access to individual items or attributes in a DynamoDB table.
Step 2: Identify the main purpose
This control is used to restrict access based on keys, ensuring users see only their data.
Final Answer:
To restrict access to specific items based on keys -> Option C
Quick Check:
Fine-grained access control = restrict by keys [OK]
Hint: Focus on access control by keys, not performance or encryption [OK]
Common Mistakes:
Confusing access control with encryption
Thinking it improves query speed
Assuming it manages backups
2. Which IAM policy condition key is used to enforce fine-grained access control in DynamoDB?
easy
A. dynamodb:LeadingKeys
B. dynamodb:TableName
C. dynamodb:Attributes
D. dynamodb:EncryptionEnabled
Solution
Step 1: Identify IAM condition keys for DynamoDB
DynamoDB uses specific condition keys in IAM policies to control access.
Step 2: Match condition key for fine-grained access
The key dynamodb:LeadingKeys restricts access based on partition key values.
A. Action should be dynamodb:Query instead of GetItem
B. Resource ARN is incorrect
C. Effect should be Deny instead of Allow
D. Condition should use ForAllValues:StringEquals with an array
Solution
Step 1: Check condition syntax for dynamodb:LeadingKeys
The condition expects an array with ForAllValues:StringEquals, not a single string with StringEquals.
Step 2: Understand impact of incorrect condition
Using StringEquals with a string causes the condition to be ignored, allowing broader access.
Final Answer:
Condition should use ForAllValues:StringEquals with an array -> Option D
Quick Check:
Use ForAllValues:StringEquals and array for LeadingKeys [OK]
Hint: Use ForAllValues:StringEquals with array for LeadingKeys [OK]
Common Mistakes:
Using StringEquals with a string instead of array
Incorrect ARN format
Confusing action types
Changing Effect to Deny unnecessarily
5. You want to allow users to read only their own orders in a DynamoDB table where the partition key is 'UserId'. Which IAM policy condition correctly enforces this fine-grained access control for user 'alice'?
hard
A. { "ForAllValues:StringEquals": { "dynamodb:LeadingKeys": ["alice"] } }
B. { "StringEquals": { "dynamodb:Attributes": ["alice"] } }
C. { "ForAnyValue:StringEquals": { "dynamodb:LeadingKeys": ["alice"] } }
D. { "StringLike": { "dynamodb:LeadingKeys": "alice*" } }
Solution
Step 1: Identify correct condition operator for exact key match
For fine-grained access, ForAllValues:StringEquals with an array ensures all keys match exactly.
Step 2: Evaluate options for correct syntax and semantics
{ "ForAllValues:StringEquals": { "dynamodb:LeadingKeys": ["alice"] } } uses correct operator and array format; others use wrong keys or operators.
Final Answer:
{ "ForAllValues:StringEquals": { "dynamodb:LeadingKeys": ["alice"] } } -> Option A
Quick Check:
Exact key match needs ForAllValues:StringEquals with array [OK]
Hint: Use ForAllValues:StringEquals with array for exact user keys [OK]
Common Mistakes:
Using dynamodb:Attributes instead of LeadingKeys
Using StringEquals without array
Using StringLike which allows wildcards
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.