'Correct Structure for Multiple Non-hierarchical Keys in DynamoDB
I'm looking for some advice on how to model a table in DynamoDB where I need to lookup on several different keys. The object looks like this:
{
memberId: string;
cognitoUserId: string;
cognitoTmpPassword: string;
email: string;
britecoreGroupId: string;
policyNumbers: string[];
}
We need to be able to perform lookups by memberId, cognitoUserId or email for different use cases. What is the optimal way to structure the table for this?
Thank you!
Solution 1:[1]
Ah, I think secondary indexes are what I need. All good.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | adamf321 |
