1
votes

I had created a table in dynamo db called Music with item Taylor Swift. I wanted to get this item through command line but it repeatedly gives me this error.

~ % aws dynamodb get-item --table-name Music --key '{ "Artist" : { "S" : "Taylor Swift"}}'

An error occurred (ValidationException) when calling the GetItem operation: The provided key element does not match the schema

I triple checked if the attribute type was right. What else could be wrong?

1
Providing your table definition would be useful so that we can understand the structure of the table a little more. For example, it would be useful to know if you have a SK.Alex Bailey

1 Answers

1
votes

For the primary key, you must provide all of the attributes. For example, with a simple primary key, you only need to provide a value for the partition key. For a composite primary key, you must provide values for both the partition key and the sort key.