In this video, we are going to write items in back into Dynamo DB table, so we will use batch write
item command when we are performing this action.
To do that, please open the documentation which is the client dynamo DB and go to the beach write item
command to see details in here.
If you scroll down you can see that the example usage of the batch write item command.
This is the R command and we will use these input format when preparing parameters.
We can see that there is a request items collection.
If you click the request items, you can see that this is the items collection that we are going to
writing back into Dynamo DB table.
So to perform this action, please open the visual code and I have created the right batch item and
let me explain this code.
As you can see that we are using the same structure and this time we will use batch write item command
and this command is importing in this statement.
And the important difference is parameters.
If you come to parameters, you can see that we are using the request items collection, we are giving
the table name, which is the product.
And in the table name we can perform put request two times.
We are performing to put request and we are inserting, inserting a new item which ID one and ID two.
So this will be insert to item into dynamo DB table which table name is product.
So to implement this, please come here and run the node command note right.
Batch command hit enter.
So as you can see that we have successfully insert items to verify that please open the console and
run the scan command.
See that we have inserted two items successfully.