1
votes

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

1 Answers

1
votes

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.