Search code examples
amazon-web-serviceskeyamazon-dynamodb

DynamoDB GSI with range key item count 0


I have a table in DynamoDB that looks like this:

enter image description here

I added a global secondary index on "Category" to the table and it worked fine and gave me the number of items in the table under item count.

I then realized that i actually needed to be able to search for in a particular "Category" but sorted by "UserRating"

So I deleted the GSI and made a new one like this:

enter image description here

This all worked fine I thought, the names where correct the types (string) for Category and (number) for UserRating was correct.

But then after it finished creating the GSI I looked at the console and it is showing item count 0 even though there should be 13 in this testing table as pictured below:

enter image description here

Thanks for your help.


Solution

  • Found the answer. I had my read write capacity set to 1 unit for everything while testing as soon as I increased it fixed the error and I could see the items.