Question: Can a DynamoDB range key be a GSI key?

Answered by Rafal Wilinski
Answer
Yes, a DynamoDB range key can also be used as a GSI (global secondary index).It is common to use the same attribute as the range key and the GSI key. When you create a GSI, you can specify the range key attribute as the key to be indexed. This allows you to perform query operations on the range key attribute using the GSI and query and scan operations on the primary key attribute using the table.
Other Common DynamoDB FAQ (with Answers)
- Is DynamoDB a wide-column store?
- Is it possible to make a DynamoDB table case insensitive?
- How do parallelize requests in DynamoDB?
- How to grab data from AWS DynamoDB?
- Does DynamoDB have triggers?
- What is the maximum number of partitions in DynamoDB?
- How to tell if DynamoDB initialized correctly?
- Is DynamoDB cost effective?
- Does DynamoDB support load balancing?
- How to store location coordinates in DynamoDB?
- Is LSI automatically created on DynamoDB?
- Is DynamoDB OLTP or OLAP?
- What are the differences between DynamoDB and Snowflake?
- How to handle empty strings in DynamoDB?
- How to forcefully delete a DynamoDB table?
Better DynamoDB experience.
First 7 days are. No credit card needed.
Product Features
DynamoDB Tools
DynamoDB Info
© 2025 Dynobase