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?
You can create Global Secondary Indexes on other fields.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With