boto/boto — pull request #517 by nishant123001 (2012-01-25 14:32:14+00:00)
Title: Conditional put was causing "condition failed" error, even when the condition was met

There are two kind of conditional puts in dynamodb
1. If attribute exists or not. Is is needed to be represented in the request as {"attr_name" : {"Exist" : } }
2. We can also check the value of the attribute and only change the data if that condition is met. e.g
for Item.put if expected_value is {"attr_name": "old_attr"}
Then "put: will only be successful if the "attr_name" attribute in the dynamodb was previously has value "old_attr"

The correct format for the request should be {"attr_name" : {"Value" : {"S" : "old_attr"} } }
but we were always sending it as {"attr_name" : {"S" : "old_attr"} } . hence the Item.put was always failing.