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)
- Does DynamoDB have read replicas?
- Is connection pooling needed for DynamoDB?
- Can firehose write to DynamoDB?
- In DynamoDB, can I use UUID as the partition key?
- How to handle empty strings in DynamoDB?
- Can we rename DynamoDB table?
- Does DynamoDB support Multi-AZ?
- How do you enable cloudtrail for DynamoDB?
- Can DynamoDB trigger AWS Step Functions?
- Can DynamoDB store documents?
- How to forcefully delete a DynamoDB table?
- Is DynamoDB a wide-column store?
- Should you make a new DynamoDB client for each request?
- How is data stored in DynamoDB?
- Is DynamoDB OLTP or OLAP?
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today
Product Features
DynamoDB Tools
DynamoDB Info
© 2026 Dynobase