Question: Does DynamoDB support atomic updates?

Answered by Rafal Wilinski
Last updated: October 23rd, 2026
Answer
Yes. DynamoDB's UpdateItem operation changes a single item atomically, including changes to several attributes in the same request. Other writers cannot observe a partially applied update.
Use an UpdateExpression to set or remove attributes, increment a number, or append values to a list. For example, SET #count = if_not_exists(#count, :zero) + :one increments a counter without first reading it. Map #count to the attribute name and supply numeric values for :zero and :one.
Atomicity does not prevent every concurrency bug. If you read an item, calculate a replacement value and write it without a condition, another writer can be overwritten. Add a ConditionExpression that checks a version or expected value, and handle ConditionalCheckFailedException when it no longer matches. See conditional updates.
An atomic increment is also not idempotent: retrying it after an ambiguous response can increment twice. For operations such as charging an account, use an application idempotency record or an appropriate transaction design instead of an unguarded counter.
For all-or-nothing changes to several items, use DynamoDB transactions. Ordinary batch writes do not provide that guarantee.
Other Common DynamoDB FAQ (with Answers)
- How do you enable CloudTrail for DynamoDB?
- Should you make a new DynamoDB client for each request?
- Does DynamoDB have read replicas?
- How is data stored in DynamoDB?
- Is DynamoDB based on MongoDB?
- Can you force-delete a DynamoDB table?
- What are the differences between DynamoDB and Google Bigtable?
- What are the naming conventions in DynamoDB?
- How do you store Japanese characters in DynamoDB?
- How to access DynamoDB from EC2?
- How do you store a graph in DynamoDB?
- Can DynamoDB store images?
- Can DynamoDB store blob data?
- Can you rename a DynamoDB table?
- What is the maximum number of partitions in DynamoDB?
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today