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?
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?
Share Improve this question asked Aug 11, 2016 at 18:57 Charlie FishCharlie Fish 20.6k23 gold badges106 silver badges198 bronze badges1 Answer
Reset to default 7You can create Global Secondary Indexes on other fields.