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)
- Which AWS regions support DynamoDB?
- Is DynamoDB serverless?
- How to enable DynamoDB monitoring?
- Does DynamoDB support read replicas?
- How do you store JSON on DynamoDB?
- How does DynamoDB handle data changes?
- Can colons and special characters be used in DynamoDB attributes?
- Is DynamoDB SQL or NoSQL?
- What are the naming conventions in DynamoDB?
- Is DynamoDB PaaS or SaaS?
- When to use DynamoDB?
- Does DynamoDB Support SQL?
- Can DynamoDB store images?
- Can you store XML in DynamoDB?
- How to tell if DynamoDB initialized correctly?
Login to the AWS Console less. Use Dynobase.
Start your 7-day free trial today
Product Features
DynamoDB Tools
DynamoDB Info
© 2025 Dynobase