Bird
0
0

An IAM policy includes:

medium📝 Debug Q7 of 15
DynamoDB - Security and Access Control
An IAM policy includes:
{"Effect": "Allow", "Action": "dynamodb:UpdateItem", "Resource": "arn:aws:dynamodb:us-west-2:123456789012:table/Users", "Condition": {"StringEquals": {"dynamodb:LeadingKeys": ["user123"]}}
but updates fail. What is the likely cause?
AEffect should be Deny to allow updates.
BThe Condition restricts updates to items with partition key 'user123'.
CThe Resource ARN is missing the index name.
DThe Action 'UpdateItem' is invalid.
Step-by-Step Solution
Solution:
  1. Step 1: Understand the Condition element

    The Condition restricts updates to items whose partition key matches 'user123'.
  2. Step 2: Reason why updates fail

    If the update targets an item with a different key, it will be denied due to this Condition.
  3. Final Answer:

    The Condition restricts updates to items with partition key 'user123'. -> Option B
  4. Quick Check:

    Condition limits allowed keys [OK]
Quick Trick: Conditions can restrict which items are accessible [OK]
Common Mistakes:
MISTAKES
  • Ignoring Condition restrictions
  • Thinking Action is invalid
  • Assuming Resource must include index

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More DynamoDB Quizzes