Skip to content

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.

Try it. Then change it.

Predict what each request will do. Run it, inspect the response, then change a value in the workbench and try again.

  1. SET changes one attribute and leaves the rest of the META item untouched.

  2. ADD increments a number atomically, server-side, creating it from zero. Run it again and it climbs.

Built on this

PlaylistsDynamoDB workbench
Ready to run
Explore an access patternSelect to load & run

SET changes one attribute and leaves the rest of the META item untouched.

Request
Execute against the local Dynoxide engine
ReturnedFiltered outChanged
pk(pk)
sk(sk)
name
owner
title
seconds
PLAYLIST#chill
METAS
ChillS
adaS
—
—
PLAYLIST#chill
TRACK#001S
—
—
WeightlessS
485N
PLAYLIST#chill
TRACK#002S
—
—
An EndingS
252N
PLAYLIST#chill
TRACK#003S
—
—
Avril 14thS
120N
PLAYLIST#focus
METAS
FocusS
linusS
—
—
PLAYLIST#focus
TRACK#001S
—
—
SubstrataS
360N
PLAYLIST#focus
TRACK#002S
—
—
Music for 18 MusiciansS
3360N
PLAYLIST#focus
TRACK#003S
—
—
Spiegel im SpiegelS
540N
PLAYLIST#focus
TRACK#004S
—
—
MetamorphosisS
600N
PLAYLIST#focus
TRACK#005S
—
—
GlassworksS
380N
PLAYLIST#energy
METAS
EnergyS
graceS
—
—
PLAYLIST#energy
TRACK#001S
—
—
Lose YourselfS
326N
PLAYLIST#energy
TRACK#002S
—
—
BangarangS
215N
PLAYLIST#energy
TRACK#003S
—
—
TitaniumS
245N
PLAYLIST#energy
TRACK#004S
—
—
LevelsS
340N
PLAYLIST#energy
TRACK#005S
—
—
One More TimeS
320N
PLAYLIST#sleep
METAS
SleepS
adaS
—
—
PLAYLIST#sleep
TRACK#001S
—
—
SleepS
480N
PLAYLIST#sleep
TRACK#002S
—
—
We Move LightlyS
300N
PLAYLIST#sleep
TRACK#003S
—
—
SamanS
510N
PLAYLIST#sleep
TRACK#004S
—
—
Nuvole BiancheS
360N
PLAYLIST#commute
METAS
CommuteS
samS
—
—
PLAYLIST#commute
TRACK#001S
—
—
RoygbivS
180N
PLAYLIST#commute
TRACK#002S
—
—
TeardropS
330N
PLAYLIST#commute
TRACK#003S
—
—
Midnight CityS
244N
PLAYLIST#commute
TRACK#004S
—
—
Open Eye SignalS
460N
Awaiting request
Your next query starts here.

Choose an access pattern above, or build your own request. See what comes back and what it costs.

Powered by DynoxideWASMStarts on your first run · Runs locally in your browser