Bird
0
0

A developer writes this item to DynamoDB:

medium📝 Debug Q7 of 15
AWS - DynamoDB
A developer writes this item to DynamoDB:
{"UserID": {"S": "001"}, "Age": {"N": "twenty"}}

Why does this cause an error?
AThe number attribute "Age" has a non-numeric string value
BThe primary key "UserID" is missing
CThe attribute names are invalid
DDynamoDB does not support number attributes
Step-by-Step Solution
Solution:
  1. Step 1: Check attribute types and values

    "Age" is typed as number "N" but value is "twenty" which is not numeric.
  2. Step 2: Understand DynamoDB number attribute rules

    Number attributes must have numeric string values like "20", not words.
  3. Final Answer:

    The number attribute "Age" has a non-numeric string value -> Option A
  4. Quick Check:

    Number attribute must be numeric string [OK]
Quick Trick: Number attributes need numeric strings only [OK]
Common Mistakes:
  • Using words for number values
  • Missing primary key
  • Wrong attribute names

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes