Demo: Creating A Global Secondary Index
Explore how to create global secondary indexes (GSIs) in DynamoDB to support different query patterns such as fetching songs by artist, genre, or album. Learn the process of defining partition and sort keys, using JSON configurations, and deploying GSIs to enhance data access flexibility.
We'll cover the following...
We'll cover the following...
Creating a GSI with the table
Let’s go back to our MusicColection example. We want a table that can be used as a query for the following use cases:
-
Creating a playlist of all the songs produced by a particular
Artist. -
Creating a playlist of all the songs belonging to a
Genre.
Now, this is a new table that we want to create. We can create the GSI while creating the table. We should keep Artist as the Partition Key for the ...