I created a DynamoDB table and was running the following command in the CLI
aws dynamodb put-item
--table-name NBATeams
--item '{"Team": {"S": "Team Name"},"Title": {"S": "Suns"}}'
--region us-east-1
but I keep getting "An error occurred (ValidationException) when calling the PutItem operation: One or more parameter values were invalid: Missing the key Team Name in the item" Not sure What am I missing since my partition key is City.
aws dynamodb put-item
--table-name NBATeams
--item '{"Team": {"S": "Team Name"},"Title": {"S": "Suns"}}'
--region us-east-1
2
Answers
i believe problem is with your partition key, please double checked the name of your "PARTTION_KEY " make sure all attribute names, values, and keys are case sensitive.
When doing a
put-item
you must provide the exact keys for the table, which includes the partition key and sort key if one is defined.If you still face issue, share the output of the
describe-table
command so we can understand your schema.I believe your key is
Team Name