From the course: AWS Certified Developer - Associate (DVA-C02) Cert Prep

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Amazon DynamoDB Secondary Indexes overview

Amazon DynamoDB Secondary Indexes overview

- [Instructor] Now let's talk about the secondary index in DynamoDB. When you want to retrieve a specific item from a DynamoDB table, you simply perform a query, provide a partition key value, and optionally, a sort key value if you have created one. DynamoDB will return whatever item you're interested in with no problem. You can also create a more flexible query than this. So maybe once you get the list of all data that an iot device has sent within a certain timeframe. You can do so by making a query using the device ID as a partition key with a filter expression using the between key condition. While these methods work fine, there are some use cases where searching doesn't always revolve around the partition key and the sort key. Take this table for an example. So what we have here is a simple database for a music streaming application. As for the schema design, we have the playlist ID as the partition key, the…

Contents