Reputation: 3264
If I do a putItem() which returns a result structure, how do I determine if the write succeeded or failed?
Upvotes: 3
Views: 1336
Reputation: 105083
AWS RESTful API is using HTTP status codes for identification of problems. PutItem
returns HTTP code 200 if your item was accepted by DynamoDB for writing. All APIs (incl. PHP and Java) parse these codes and throw exceptions if it's not 200.
Keep in mind, that code 200 doesn't mean that you can immediately read this item from DynamoDB. It only means that it's accepted for writing. Read more about DynamoDB consistency models.
Upvotes: 3