ConditionalCheckFailedException: The conditional request failed
A write’s ConditionExpression evaluated to false, so DynamoDB didn’t perform it — often exactly as designed.
The conditional request failedTransactionCanceledException ConditionalCheckFailed Meaning
Conditions like attribute_not_exists(pk) (create-only) or version = :v (optimistic locking) fail when the item already exists or changed. Handle it as a business outcome (duplicate, conflict), not a crash.
Common causes
- Item already exists (attribute_not_exists)
- Version/attribute changed by another writer
- Condition expression references the wrong attribute name
⚡ Quick fix
- Catch the exception and handle duplicate/conflict
- Re-read and retry with the new version
- Use ReturnValuesOnConditionCheckFailure to see the current item
Detailed fix by platform
Python
- python
try: table.put_item(Item=item, ConditionExpression="attribute_not_exists(pk)") except table.meta.client.exceptions.ConditionalCheckFailedException: pass # already exists
How to diagnose
- Condition — Expression and values
- Item — Current item state
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in AWS
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 13 Oct 2026