Bird
0
0

Which of the following is the correct way to enable DynamoDB Streams on a table using AWS CLI?

easy📝 Syntax Q12 of 15
DynamoDB - with Serverless
Which of the following is the correct way to enable DynamoDB Streams on a table using AWS CLI?
Aaws dynamodb set-stream --table MyTable --enabled true
Baws dynamodb enable-stream --table MyTable --type NEW_IMAGE
Caws dynamodb create-stream --table-name MyTable --view-type KEYS_ONLY
Daws dynamodb update-table --table-name MyTable --stream-specification StreamEnabled=true,StreamViewType=NEW_AND_OLD_IMAGES
Step-by-Step Solution
Solution:
  1. Step 1: Recall AWS CLI command for enabling streams

    The correct command uses 'update-table' with '--stream-specification' to enable streams.
  2. Step 2: Verify syntax and parameters

    aws dynamodb update-table --table-name MyTable --stream-specification StreamEnabled=true,StreamViewType=NEW_AND_OLD_IMAGES correctly sets StreamEnabled=true and specifies StreamViewType as NEW_AND_OLD_IMAGES.
  3. Final Answer:

    aws dynamodb update-table --table-name MyTable --stream-specification StreamEnabled=true,StreamViewType=NEW_AND_OLD_IMAGES -> Option D
  4. Quick Check:

    Enable streams = update-table + stream-specification [OK]
Quick Trick: Use update-table with stream-specification to enable streams [OK]
Common Mistakes:
MISTAKES
  • Using non-existent commands like enable-stream
  • Incorrect parameter names
  • Confusing create-stream with enabling streams

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More DynamoDB Quizzes