1

Having an existing GSI with key (HASH: user, RANGE: date), can I update the key to (HASH: group, RANGE: date) without creating a new index?

The group attribute is an existed attribute i table and also projected into the GSI already.

1 Answer 1

1

No, DynamoDB does not support changing the HASH and RANGE values for tables or indexes, if you need them changed you will have to create a new GSI with the desired values and remove the old one.

Extra: If you hav't already i would highly suggest watching this video about DynamoDB design patterns it might provide useful insight that may help up down the line.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.