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 access DynamoDB from EC2?
- Are DynamoDB table names supposed to be unique?
- How to track changes to items in DynamoDB?
- Can we store list in DynamoDB?
- Can Tableau connect to DynamoDB?
- How to write a test case for mocking DynamoDB?
- Is DynamoDB table region specific?
- Should you make a new DynamoDB client for each request?
- Can Power BI connect to DynamoDB?
- What are the key differences between DynamoDB and Neo4j?
- How to access DynamoDB from outside?
- What are the key differences between DynamoDB and Elasticsearch?
- Can DynamoDB trigger AWS Step Functions?
- Is DynamoDB open source?
- How to dump multiple DynamoDB tables?
Tired of switching accounts and regions? Use Dynobase.
Try 7-day free trial. No credit card needed.
Product Features
DynamoDB Tools
DynamoDB Info
© 2026 Dynobase