Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon Web Services DynamoDB Multiple Partition Keys

Is there a way to have multiple partition keys in a DynamoDB table? I currently have an ID field as the partition key. Which means I can only use get when passing in the ID. I would like to be able to use get for other fields such as email, first name, last name, etc.

My current method is I do a scan of the DB and run through a loop to find the record I'm looking for. Which is not very scalable and not a good method.

Any good way to do this by either adding more partition keys or is there another method I'm not seeing?

like image 256
Charlie Fish Avatar asked Aug 11 '16 18:08

Charlie Fish


Video Answer


1 Answers

You can create Global Secondary Indexes on other fields.

like image 178
Mark B Avatar answered Oct 09 '22 04:10

Mark B