I am modeling a simple application an I would like to use DynamoDB as my storage. I need to store a all order from a ecommerce website. It is possible to query using the order_id and the user email.
Looking at the dynamodb documentation, I think the best approach is to user the order_id (Most of my queries will be made on this index) as my primary key (Partition key).
And what about email? I would like a secondary index, but I am bit lost. What is the best approach?