## 1件登録 `user.json`が登録データ。 ```console aws dynamodb put-item \ --table-name users \ --item file://user.json ``` ```json:user.json { "Id": {"S": "00001"}, "Name": {"S": "tadashi-aikawa"} } ``` ## 複数件登録 ```console aws dynamodb batch-write-item \ --request-items file://init.json ``` ```json:init.json { "users": [ { "PutRequest": { "Item": { "Id": { "S": "00001" }, "Name": { "S": "tadashi-aikawa" } } } }, { "PutRequest": { "Item": { "Id": { "S": "00002" }, "Name": { "S": "tadashi-aikawa2" } } } } ] } ``` `batch-write-item`で登録できる項目は25件までなので注意。 > BatchGetItem — 1 つ以上のテーブルから最大 100 個の項目を読み込みます。 > BatchWriteItem — 1 つ以上のテーブルから最大 25 個の項目を作成または削除します。 ## MOC - 📒**関連** - 📜**アクティビティ** - 📝**トラブルシューティング** - [[DynamoDBでデータ登録で文字列プロパティ以外がInvalid type for parameter]]