Secondary Index in a DynamoDB Table
There are two methods to access the data in DynamoDB—scan and query. Both data read options have their separate limitations. Asking for a primary key in the query method is quick, but it can only give us a limited set of access patterns. Scanning can give us any access pattern, but it’s slow and expensive.
In addition to the query method, there is a second option called secondary index. It’s comparatively cheaper, and it gives us more accessibility patterns.
In this lab, we’ll learn to run a query using
The following is the high-level architecture diagram of how to create a secondary index in a DynamoDB table.