In this lab, we will explore DynamoDB Local and Global Secondary Indexes, and their impact on performance and capacity unit usage.
An existing unindexed table is provided, and we will create a new table with Local and Global secondary indexes. Load the same dataset into our new table with a provided data loader, then use a test utility to observe the performance and capacity differences when performing read operations against tables with and without indexes.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Create a new table with Local and Global Secondary Indexes.
Log in to the AWS Web Console for the lab environment at the provided URL with the supplied credentials.
Note: Use the us-east-1 region for this lab.
Create a new DynamoDB Table named
album_indexed
with a Partition Key ofartist_id
and a Sort Key ofid
. Add a Local Secondary Index for theformat
attribute, and create a Global Secondary Index for thetitle
attribute.- Login to the provided EC2 instance, and use the provided utility to load data into your newly create table.
Log in to the provided EC2 instance with the provided IP and credentials.
Run the
index_table_load
command to load data into your table.- Verify table contents and test querying against the indexes you’ve created.
Return to the AWS Web Console and verify that data has been loaded to the
album_indexed
table. Test querying against thetitle
andformat indexes
.- Run the provided test utility and observe the results.
Return to the provided EC2 instance, run the provided
pineheadrecords_query
command, observe the results of the scan/filter against thealbum
table, and query against thealbum_indexed
table.