Guided Lab: Querying a Global Secondary Index
Description
A Global Secondary Index (GSI) in DynamoDB is an index with a partition key and a sort key that can be different from those on the base table. It allows for efficient querying of data based on different attributes. A global secondary index is considered ‘global’ because queries on the index can span all of the data in the base table, across all partitions. GSIs provide flexibility in querying data in various ways without impacting the performance of the base table. Additionally, a global secondary index has no size limitations and has its own provisioned throughput settings for read and write activity that is separate from those of the table, allowing for independent scaling and optimization.
Prerequisites
This lab assumes you have experience creating an Amazon DynamoDB table and are familiar with its basic components
If you find any gaps in your knowledge, consider taking the following labs:
-
Creating an Amazon DynamoDB table
Objectives
In this lab, you will learn how to:
- Understand the concept of Global Secondary Indexes in DynamoDB.
- Learn how to create a Global Secondary Index.
- Learn how to query a Global Secondary Index.