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 charge for storage?
- Is DynamoDB open source?
- How do I create an id in DynamoDB?
- Is DynamoDB table region specific?
- How to track changes to items in DynamoDB?
- Can you store XML in DynamoDB?
- What are the differences between DynamoDB and Snowflake?
- How to create an index in DynamoDB? (how to create an index in dynamodb)
- How to store graphs in DynamoDB?
- What is the maximum number of partitions in DynamoDB?
- What is the access pattern in DynamoDB?
- Are DynamoDB table names globally unique?
- Is DynamoDB a wide-column store?
- Can DynamoDB trigger AWS Step Functions?
- Can we pass objects as an item in DynamoDB?
Dynobase is a Professional GUI Client for DynamoDB
Try 7-day free trial. No strings attached.
Product Features
DynamoDB Tools
DynamoDB Info
© 2025 Dynobase