Bird
0
0

Which AWS CLI command correctly creates a DynamoDB table named Users with a primary key UserId of type string?

easy📝 Configuration Q12 of 15
AWS - DynamoDB
Which AWS CLI command correctly creates a DynamoDB table named Users with a primary key UserId of type string?
Aaws dynamodb create-table --table-name Users --attribute-definitions AttributeName=UserId,AttributeType=S --key-schema AttributeName=UserId,KeyType=HASH --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5
Baws dynamodb create-table --name Users --key UserId --type String
Caws dynamodb make-table --table Users --key UserId --type S
Daws dynamodb create-table --table Users --attribute UserId String --key UserId HASH
Step-by-Step Solution
Solution:
  1. Step 1: Identify correct AWS CLI syntax for creating a table

    The correct command uses create-table with --table-name, --attribute-definitions, --key-schema, and --provisioned-throughput.
  2. Step 2: Verify attribute and key schema details

    AttributeName=UserId with AttributeType=S (string) and KeyType=HASH for primary key is correct.
  3. Final Answer:

    aws dynamodb create-table --table-name Users --attribute-definitions AttributeName=UserId,AttributeType=S --key-schema AttributeName=UserId,KeyType=HASH --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 -> Option A
  4. Quick Check:

    Correct CLI syntax = aws dynamodb create-table --table-name Users --attribute-definitions AttributeName=UserId,AttributeType=S --key-schema AttributeName=UserId,KeyType=HASH --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 [OK]
Quick Trick: Use --attribute-definitions and --key-schema for keys [OK]
Common Mistakes:
MISTAKES
  • Using wrong command like make-table
  • Missing provisioned throughput
  • Incorrect flags like --name instead of --table-name

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes