Devicedriver
Devicedriver

Reputation: 187

How can I fetch all items from a DynamoDB table without specifying the primary key with java?

I'm fairly new to Amazon's AWS and its API for Java, so I'm not exactly sure what the most efficient method for what I'm trying to do would be. Basically, I'm trying to setup a database that will store a project's ID, it's status, as well as the bucket. What I'm having trouble with is getting a list of all user without primary key ?. Any recommendations?

Upvotes: 16

Views: 25742

Answers (1)

RandomQuestion
RandomQuestion

Reputation: 6998

You can use the 'Scan' operation provided by DynamoDB. It does not need primary key to operate on. But keep in mind that scan operation is very inefficient and needs more read capacity. Read about Scan here on it's official doc.

http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html

If you want to just retrieve all the entries, DynamoDB is probably not a acorrect choice for storing this data.

Upvotes: 14

Related Questions