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 table region specific?
- Is DynamoDB open source?
- Is DynamoDB based on MongoDB?
- Does DynamoDB have read replicas?
- Is DynamoDB HIPAA compliant?
- Can we pass objects as an item in DynamoDB?
- How to create an index in DynamoDB? (how to create an index in dynamodb)
- Does DynamoDB charge for storage?
- How to dump multiple DynamoDB tables?
- Is DynamoDB ACID compliant?
- Can DynamoDB have duplicates?
- What are the naming conventions in DynamoDB?
- Are DynamoDB table names globally unique?
- Can QuickSight read DynamoDB?
- Can we rename DynamoDB table?
Tired of switching accounts and regions? Use Dynobase.
Start your 7-day free trial today
Product Features
DynamoDB Tools
DynamoDB Info
© 2026 Dynobase