- Lab
- A Cloud Guru
Working with DynamoDB Local and Global Indexes
In this lab, we will explore local and global secondary indexes in DynamoDB and investigate 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. **Note:** Please use the `us-east-1` region for this lab.
Path Info
Table of Contents
-
Challenge
Create a New Table with Local and Global Secondary Indexes
- Log in to the AWS Management 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.
- Log in to the AWS Management Console for the lab environment at the provided URL with the supplied credentials.
Note: Use the
-
Challenge
Log In to the EC2 Instance and Load Data into Your Newly Created 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.
-
Challenge
Verify the Table Contents and Test Querying Against the Indexes You Created
- Return to the AWS Management Console and verify the data has been loaded to the
album_indexed
table. - Test querying against the
title
andformat
indexes.
- Return to the AWS Management Console and verify the data has been loaded to the
-
Challenge
Run the Provided Test Utility and Observe the Results
- Return to the provided EC2 instance, run the provided
records_query
command, and observe the results of the scan/filter against thealbum
table and query against thealbum_indexed
table.
- Return to the provided EC2 instance, run the provided
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.