The answer is that the role can only access items where the partition key matches the principal's identifier. This is achieved through DynamoDB fine-grained access control using the `LeadingKeys` condition key, which restricts operations to items whose partition key value equals the IAM role’s unique identifier, typically referenced via `${aws:userid}`. On the AWS Certified Database Specialty DBS-C01 exam, this concept tests your understanding of row-level security within DynamoDB, often appearing in scenario-based questions where an application must isolate tenant data in a shared table. A common trap is confusing `LeadingKeys` with time-based conditions like `aws:CurrentTime` or assuming it grants full table access; remember that `LeadingKeys` explicitly ties access to the partition key value. Memory tip: think “LeadingKeys = Leading the user to their own rows only.”
DBS-C01 Workload-Specific Database Design Practice Question
This DBS-C01 practice question tests your understanding of workload-specific database design. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
Exhibit
Refer to the exhibit.
Consider the following IAM policy attached to an IAM role used by an application:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"dynamodb:GetItem",
"dynamodb:Query",
"dynamodb:PutItem"
],
"Resource": "arn:aws:dynamodb:us-east-1:123456789012:table/orders",
"Condition": {
"ForAllValues:StringEquals": {
"dynamodb:LeadingKeys": ["${aws:userid}"]
}
}
}
]
}
The application uses the IAM role to access the 'orders' DynamoDB table. What is the intended effect of this policy?
Refer to the exhibit.
Consider the following IAM policy attached to an IAM role used by an application:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"dynamodb:GetItem",
"dynamodb:Query",
"dynamodb:PutItem"
],
"Resource": "arn:aws:dynamodb:us-east-1:123456789012:table/orders",
"Condition": {
"ForAllValues:StringEquals": {
"dynamodb:LeadingKeys": ["${aws:userid}"]
}
}
}
]
}
A
The role can perform any DynamoDB action on the 'orders' table
Why wrong: Only GetItem, Query, PutItem are allowed, and with a condition.
B
The role can only access items where the partition key matches the principal's identifier
The condition restricts access to items with LeadingKeys equal to the aws:userid.
C
The role can access all items in the table but only during specific times
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The role can only access items where the partition key matches the principal's identifier
The policy uses a condition key like `dynamodb:LeadingKeys` with a value referencing the principal's identifier (e.g., `${aws:userid}`). This restricts access to only those items in the 'orders' table whose partition key matches the IAM role's unique identifier, enforcing row-level security. The intended effect is fine-grained access control, not full table access or time-based restrictions.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
✗
The role can perform any DynamoDB action on the 'orders' table
Why it's wrong here
Only GetItem, Query, PutItem are allowed, and with a condition.
✓
The role can only access items where the partition key matches the principal's identifier
Why this is correct
The condition restricts access to items with LeadingKeys equal to the aws:userid.
Related concept
Read the scenario before looking for a memorised answer.
✗
The role can access all items in the table but only during specific times
Why it's wrong here
No time-based condition is specified.
✗
The role is denied access to the 'orders' table
Why it's wrong here
Effect is Allow, not Deny.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates assume a policy with `Allow` on DynamoDB actions grants full table access, overlooking the `Condition` block that restricts access to specific items based on the partition key.
Detailed technical explanation
How to think about this question
Under the hood, DynamoDB evaluates `dynamodb:LeadingKeys` at the item level during query or scan operations, allowing only rows where the partition key matches the condition value. This is commonly used in multi-tenant designs where each IAM role corresponds to a tenant, ensuring data isolation without separate tables. A subtle behavior is that this condition only applies to `GetItem`, `Query`, `Scan`, `PutItem`, `UpdateItem`, and `DeleteItem`; it does not affect `DescribeTable` or `ListTables`.
KKey Concepts to Remember
Read the scenario before looking for a memorised answer.
Find the constraint that changes the correct option.
Eliminate answers that are true in general but not in this case.
TExam Day Tips
→Watch for words such as best, first, most likely and least administrative effort.
→Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A company's IT admin needs to give a contractor read-only access to production logs without sharing account credentials. Using role-based access control (RBAC) and temporary scoped permissions — not a permanent shared password — is the correct pattern. Questions like this test whether you can apply least-privilege access across cloud identity services.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Workload-Specific Database Design — This question tests Workload-Specific Database Design — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: The role can only access items where the partition key matches the principal's identifier — The policy uses a condition key like `dynamodb:LeadingKeys` with a value referencing the principal's identifier (e.g., `${aws:userid}`). This restricts access to only those items in the 'orders' table whose partition key matches the IAM role's unique identifier, enforcing row-level security. The intended effect is fine-grained access control, not full table access or time-based restrictions.
What should I do if I get this DBS-C01 question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
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 →
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.
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.