I have table with "RefNumber", "status" and "Date". "RefNumber" is the partition Key and "Status" is the sort key So, both make a primary key.
{
"RefNumber": "122345",
"Status": "0",
"DateTime": 15343354545
}
Now after fetching this record, I want to update "Status" with "1". I have multiple workers reading the DynamoDB records, just to avoid any 2 workers processing the same record I want to fetch and update the "Status" with "1" using ConditionExpression, if the update succeeds the worker will process else it will skip.
My question is, is it a good design to update the attribute value which is part of the primary key in dynamodb