0

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.

  1. my Item1 has a field GSI_sk with the value OPEN#1234
  2. I update Item1 which GSI_sk is changed to CLOSED#1234
  3. The GSI_sk remained unchanged (still OPEN#1234) when I queried Item1 again

How to update my item and also update the GSI_sk field?

Quang
  • 135
  • 2
  • 9

0 Answers0