key value store - DynamoDB Schema Design - Order Model -
i modeling simple application use dynamodb storage. need store order ecommerce website. possible query using order_id , user email. looking @ dynamodb documentation, think best approach user order_id (most of queries made on index) primary key (partition key). and email? secondary index, bit lost. best approach? it looks global secondary index on email attribute solve problem: when need lookup order_id , use getitem operation , specify order_id primary key when need lookup email , use query api on gsi , specify email partition key. gsi have independent read capacity units - since said use order_id of time, provision more rcu main table gsi. reference: http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/gsi.html http://docs.aws.amazon.com/amazondynamodb/latest/apireference/api_getitem.html http://docs.aws.amazon.com/amazondynamodb/latest/apireference/api_query.html