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)
- How to write a test case for mocking DynamoDB?
- How to track changes to items in DynamoDB?
- What are the differences between DynamoDB and MySQL?
- How to store graphs in DynamoDB?
- Is DynamoDB HIPAA compliant?
- How to store Japanese characters in DynamoDB?
- What are the naming conventions in DynamoDB?
- Can Power BI connect to DynamoDB?
- What is the maximum number of partitions in DynamoDB?
- Does DynamoDB charge for storage?
- Does DynamoDB support atomic updates?
- Is DynamoDB a memory store?
- Can QuickSight read DynamoDB?
- How to import data from S3 to DynamoDB?
- What does the DynamoDB query return?
Dynobase is a Professional GUI Client for DynamoDB
Try 7-day free trial. No strings attached.
Product Features
DynamoDB Tools
DynamoDB Info
© 2025 Dynobase