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
Item1
has a fieldGSI_sk
with the valueOPEN#1234
- I update
Item1
whichGSI_sk
is changed toCLOSED#1234
- The
GSI_sk
remained unchanged (stillOPEN#1234
) when I queriedItem1
again
How to update my item and also update the GSI_sk
field?