My dynamoDB table has a GSI which its sort key is composite key. This composite key looks like this: #STATUS#CREATED_AT. The status field can be changed during update action on item, but I noticed even if I change the GSI_sk in primary table, this field doesn't change at all.
e.g.
- my
Item1has a fieldGSI_skwith the valueOPEN#1234 - I update
Item1whichGSI_skis changed toCLOSED#1234 - The
GSI_skremained unchanged (stillOPEN#1234) when I queriedItem1again
How to update my item and also update the GSI_sk field?