how to return items in a dynamodb on aws-cli

Bennjoe Mordeno picture Bennjoe Mordeno · Jan 8, 2016 · Viewed 35.4k times · Source

So, I have a DynamoDB table Users and I want to return all the contents of this table. Or maybe even some.

I tried

aws dynamodb query --table-name Users 

and it says I have to specify key-condition or key-condition-expression, so I added the following:

aws dynamodb query --table-name Users --key-condition-expression Username = "test"

and it returns an error message " Unknown options: test ".

Answer

ataylor picture ataylor · Mar 2, 2016

If you want to dump the whole table, just use

aws dynamodb scan --table-name Users