Bird
0
0

Which of the following is the correct syntax to perform a Query operation in AWS DynamoDB using the AWS CLI?

easy📝 Configuration Q12 of 15
AWS - DynamoDB
Which of the following is the correct syntax to perform a Query operation in AWS DynamoDB using the AWS CLI?
Aaws dynamodb query --table-name MyTable --key-condition-expression 'Id = :id' --expression-attribute-values '{":id":{"S":"123"}}'
Baws dynamodb scan --table-name MyTable --key-condition-expression 'Id = :id' --expression-attribute-values '{":id":{"S":"123"}}'
Caws dynamodb get-item --table-name MyTable --key '{"Id":{"S":"123"}}'
Daws dynamodb update-item --table-name MyTable --key '{"Id":{"S":"123"}}'
Step-by-Step Solution
Solution:
  1. Step 1: Identify Query command syntax

    The Query operation uses 'aws dynamodb query' with key-condition-expression and expression-attribute-values.
  2. Step 2: Check other options

    Scan reads the entire table (and does not support --key-condition-expression), get-item retrieves a single item by exact key, update-item modifies items, so only the Query syntax is correct.
  3. Final Answer:

    aws dynamodb query --table-name MyTable --key-condition-expression 'Id = :id' --expression-attribute-values '{":id":{"S":"123"}}' -> Option A
  4. Quick Check:

    Query syntax uses 'query' command [OK]
Quick Trick: Query uses 'aws dynamodb query' command [OK]
Common Mistakes:
MISTAKES
  • Using Scan command instead of Query
  • Confusing GetItem with Query
  • Incorrect expression-attribute-values format

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes