Question 522 of 1,663
DBS-C01 Workload-Specific Database Design Practice Question
Exhibit
Refer to the exhibit.
```
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"dynamodb:GetItem",
"dynamodb:PutItem",
"dynamodb:UpdateItem",
"dynamodb:DeleteItem"
],
"Resource": "arn:aws:dynamodb:us-east-1:123456789012:table/UserSessions",
"Condition": {
"ForAllValues:StringEquals": {
"dynamodb:LeadingKeys": ["${aws:userid}"]
}
}
}
]
}
```A company is implementing fine-grained access control for a DynamoDB table named UserSessions. The table has a partition key of 'user_id'. The above IAM policy is attached to an IAM role assumed by the application. What does this policy achieve?
⚠ Common exam trap
Candidates often confuse `aws:userid` with the IAM user name or the partition key value, or they assume the policy grants full access (Option A) without noticing the condition that enforces row-level security.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Restricts the application to access only items where the partition key matches the user's AWS user ID
The IAM policy uses a condition key `dynamodb:LeadingKeys` with a value of `${aws:userid}`. This restricts access to items in the DynamoDB table where the partition key (`user_id`) matches the unique identifier of the IAM user or role that is making the request. This implements fine-grained access control, ensuring the application can only read or write items belonging to the authenticated user.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Allows the application to perform all operations on the UserSessions table without restrictions
Why it's wrong here
The condition restricts access based on the partition key; it does not grant unrestricted access.
- ✓
Restricts the application to access only items where the partition key matches the user's AWS user ID
Why this is correct
The condition uses 'aws:userid' to limit access to items with the corresponding partition key.
- ✗
Allows the application to read but not write items in the UserSessions table
Why it's wrong here
The policy allows PutItem, UpdateItem, and DeleteItem, so write operations are permitted.
- ✗
Allows the application to access only the UserSessions table but not other tables
Why it's wrong here
The policy grants access to the UserSessions table only, but with the condition, it further restricts to specific items.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jun 11, 2026
This DBS-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DBS-C01 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.