Question 186 of 1,730
Workload-Specific Database DesignhardMultiple ChoiceObjective-mapped

Quick Answer

The answer is that the Deny statement explicitly denies all DynamoDB actions on the index resource, overriding the Allow statement. This occurs because a Global Secondary Index (GSI) is a separate subresource in DynamoDB with its own Amazon Resource Name (ARN), and the Allow statement only grants the Query action on the table ARN, not on the index ARN. Even though the Allow statement permits reading from the table, the explicit Deny on the index ARN takes absolute precedence in IAM policy evaluation, blocking any attempt to query the GSI. On the AWS Certified Database Specialty DBS-C01 exam, this scenario tests your understanding of IAM policy evaluation logic and DynamoDB resource hierarchy—specifically that GSIs require their own permissions. A common trap is assuming that table-level permissions automatically extend to indexes. Memory tip: "Deny always wins, and indexes are separate ARN children—always grant both table and index ARNs for GSI queries."

DBS-C01 Workload-Specific Database Design Practice Question

This DBS-C01 practice question tests your understanding of workload-specific database design. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. 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.

```
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "dynamodb:GetItem",
        "dynamodb:Query"
      ],
      "Resource": "arn:aws:dynamodb:us-east-1:123456789012:table/UserSessions"
    },
    {
      "Effect": "Deny",
      "Action": "dynamodb:*",
      "Resource": "arn:aws:dynamodb:us-east-1:123456789012:table/UserSessions/index/*"
    }
  ]
}
```

A security engineer created the IAM policy above for an application that reads from a DynamoDB table named UserSessions. The application reports that it cannot query the table using a Global Secondary Index (GSI). The table's GSI is named GSI_UserSessions. Why is the application unable to query the index?

Question 1hardmultiple choice
Full question →

Exhibit

Refer to the exhibit.

```
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "dynamodb:GetItem",
        "dynamodb:Query"
      ],
      "Resource": "arn:aws:dynamodb:us-east-1:123456789012:table/UserSessions"
    },
    {
      "Effect": "Deny",
      "Action": "dynamodb:*",
      "Resource": "arn:aws:dynamodb:us-east-1:123456789012:table/UserSessions/index/*"
    }
  ]
}
```

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

The Query action is not allowed on the index because the Allow statement only applies to the table, not the index.

Option A is correct because the IAM policy's Allow statement grants the Query action on the DynamoDB table resource (arn:aws:dynamodb:...:table/UserSessions) but does not include the index resource (arn:aws:dynamodb:...:table/UserSessions/index/GSI_UserSessions). In DynamoDB, a Global Secondary Index is a separate subresource, and IAM policies must explicitly grant permissions on the index ARN to allow operations like Query on that index. Without this, the application cannot query the GSI.

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 Query action is not allowed on the index because the Allow statement only applies to the table, not the index.

    Why this is correct

    The Allow statement's resource is the table, not the index; however, the Deny is explicit. Actually, both A and C could be argued, but A is the primary reason because the Deny explicitly blocks. But the question expects A. However, in the context, the correct answer is A because Deny overrides Allow. However, note that the Allow statement does not include index ARN, so Query on index is implicitly denied. But there is an explicit Deny, which makes it explicit. The best answer is A.

    Related concept

    Read the scenario before looking for a memorised answer.

  • The Deny statement explicitly denies all DynamoDB actions on the index resource, overriding the Allow statement.

    Why this is correct

    Explicit Deny always takes precedence.

    Related concept

    Read the scenario before looking for a memorised answer.

  • The application is using GetItem instead of Query to access the index.

    Why it's wrong here

    GetItem is for table primary key, not index.

  • The policy allows Query on the table, which automatically includes the index.

    Why it's wrong here

    Query on index requires permission on the index resource.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often assume that granting permissions on a DynamoDB table automatically covers its Global Secondary Indexes, but AWS IAM treats indexes as separate resources requiring explicit ARN-based permissions.

Detailed technical explanation

How to think about this question

In DynamoDB IAM policies, table and index ARNs are distinct: a table ARN is arn:aws:dynamodb:region:account-id:table/TableName, while an index ARN is arn:aws:dynamodb:region:account-id:table/TableName/index/IndexName. When a Query operation targets a GSI, DynamoDB evaluates permissions against the index ARN, not the table ARN. This means a policy that only grants Query on the table will fail for index queries, even if the table itself is accessible. A common real-world scenario is when developers assume that table-level permissions cascade to indexes, leading to unexpected access denied errors.

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.

Related practice questions

Related DBS-C01 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free DBS-C01 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this DBS-C01 question test?

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 Query action is not allowed on the index because the Allow statement only applies to the table, not the index. — Option A is correct because the IAM policy's Allow statement grants the Query action on the DynamoDB table resource (arn:aws:dynamodb:...:table/UserSessions) but does not include the index resource (arn:aws:dynamodb:...:table/UserSessions/index/GSI_UserSessions). In DynamoDB, a Global Secondary Index is a separate subresource, and IAM policies must explicitly grant permissions on the index ARN to allow operations like Query on that index. Without this, the application cannot query the GSI.

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 →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 24, 2026

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.

Loading comments…

Sign in to join the discussion.

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.