From - docs.aws.amazon.com/amazondynamodb/latest/develop…
If an update to the table changes the value of an indexed key attribute (from A to B), two writes are required, one to delete the previous item from the index and another write to put the new item into the index.