item1 = table.new_item("a", { "message" : "message for key a" })
item2 = table.new_item("a", { "message" : "new message for key a" })
batch_list = c.new_batch_write_list()
batch_list.add_batch(table, puts=[item1, item2])
response = batch_list.submit()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.6/site-packages/boto-2.3.0-py2.6.egg/boto/dynamodb/batch.py", line 194, in submit
return self.layer2.batch_write_item(self)
File "/Library/Python/2.6/site-packages/boto-2.3.0-py2.6.egg/boto/dynamodb/layer2.py", line 439, in batch_write_item
object_hook=item_object_hook)
File "/Library/Python/2.6/site-packages/boto-2.3.0-py2.6.egg/boto/dynamodb/layer1.py", line 330, in batch_write_item
object_hook=object_hook)
File "/Library/Python/2.6/site-packages/boto-2.3.0-py2.6.egg/boto/dynamodb/layer1.py", line 133, in make_request
retry_handler=self._retry_handler)
File "/Library/Python/2.6/site-packages/boto-2.3.0-py2.6.egg/boto/connection.py", line 746, in _mexe
status = retry_handler(response, i, next_sleep)
File "/Library/Python/2.6/site-packages/boto-2.3.0-py2.6.egg/boto/dynamodb/layer1.py", line 165, in _retry_handler
data)
boto.exception.DynamoDBResponseError: DynamoDBResponseError: 400 Bad Request
{u'message': u'Provided list of item keys contains duplicates', u'__type': u'com.amazon.coral.validate#ValidationException'}