UpdateItem edits in place
UpdateItem changes named attributes and can increment a counter atomically.
Why
UpdateItem changes the attributes you name and leaves everything else alone. SET assigns a value; ADD increments a number atomically on the server, so two concurrent increments can never lose each other.
Rename the playlist, then count a play twice and watch plays climb. Note name uses an ExpressionAttributeNames placeholder because some attribute names are reserved words.
UpdateItem edits in place. ADD gives you atomic counters with no read-modify-write race.
These rows are real and already here. Running an operation against them downloads a DynamoDB-compatible engine, about 850 KB, and executes it in this tab.
SET changes one attribute and leaves the rest of the META item untouched.
Run an operation to see the raw engine response.