Bird
0
0

Given this AWS CLI command:

medium📝 Predict Output Q13 of 15
AWS - DynamoDB
Given this AWS CLI command:
aws dynamodb create-table --table-name Products --attribute-definitions AttributeName=ProductId,AttributeType=S AttributeName=Category,AttributeType=S --key-schema AttributeName=ProductId,KeyType=HASH AttributeName=Category,KeyType=RANGE --provisioned-throughput ReadCapacityUnits=10,WriteCapacityUnits=5

What is the primary key type of the Products table?
ANo primary key defined
BSimple primary key with only a HASH key
CComposite primary key with HASH and RANGE keys
DPrimary key with only a RANGE key
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the key schema in the command

    The command defines two keys: ProductId as HASH and Category as RANGE.
  2. Step 2: Understand primary key types in DynamoDB

    A primary key with both HASH and RANGE keys is called a composite primary key.
  3. Final Answer:

    Composite primary key with HASH and RANGE keys -> Option C
  4. Quick Check:

    HASH + RANGE = composite key [OK]
Quick Trick: HASH + RANGE keys mean composite primary key [OK]
Common Mistakes:
  • Thinking two attributes mean no key
  • Confusing RANGE key as standalone primary key
  • Ignoring key-schema details

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes