It does not insert all my requests into a DynamoDB table.

0

Hi, how are you? I have a problem that I don't know how to solve. I make several inserts to the DynamoDB table about 12 records of which only 5 or 6 were entered, said inserts give me a correction status but the revisions in the table after a moment and only display some of them. He made the inserts with the PutItem, BatchWriteItem, and only observed half of the records that he sent them to insert. If I send them to save to a new table, they are all entered, but due to business logic, I cannot create a new table for those insertions. Thanks for your help. Greetings

  • Do the items eventually show up? Or they never show up?

質問済み 2年前1710ビュー
1回答
4
承認された回答

Hi, if you are sending PutItem requests to DynamoDB and your receive a success 200 status code, you can be certain the item was written. As DynamoDB is a NoSQL Database, where the items must be unique based on the partition/sort key combo, I believe some of your items may be overwritten as the use the same key?

Also, when you make writes with BatchWriteItems and you have a batch of 20 items, if only 1 of these items succeed, you will receive a success 200 status. The other 19 records which may have been rejected for various reasons will show up in the UnprocessedItems key of the response payload, you must re-drive these items manually. It is suggested to ensure you use exponential backoff and retry logic to re-drive UnprocessedItems.

profile pictureAWS
エキスパート
回答済み 2年前
profile picture
エキスパート
レビュー済み 1ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ