amazon-web-services - tables - dynamodb projectionexpression

how to return items in a dynamodb on aws-cli (3)

As per my understanding you are not passing "key"(hash or hash/range) properly

create a file containing your keys: test.json

    "userName": {"S": "abc"},
    "anyRangeKey": {"S": "xyz"}  //optional


aws dynamodb get-item --table-name users --key file://test.json

Hope that helps

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 "

If you want to dump the whole table, just use

aws dynamodb scan --table-name Users

aws dynamodb get-item --table-name ProductCatalog --key "{""Id"":{""N"":""205""}}" --no-verify-ssl