The DynamoDB PutItem API is used to create a new item or to replace existing items completely with a new item. It is invoked using the put-item CLI command .
Let’s say we wanted to insert a new item into the Reply table from the console. First, navigate to the Reply table click the Create Item button.
Click JSON view
, ensure View DynamoDB JSON
is deselected, paste the following JSON, and then click Create Item to insert the new item.
{
"Id" : "Amazon DynamoDB#DynamoDB Thread 2",
"ReplyDateTime" : "2021-04-27T17:47:30Z",
"Message" : "DynamoDB Thread 2 Reply 3 text",
"PostedBy" : "User C"
}
The DynamoDB UpdateItem API is used to create a new item or to replace existing items completely with a new item. It is invoked using the update-item CLI command . This API requires you to specify the full Primary Key and can selectively modify specific attributes without changing others(you don’t need to pass in the full item).
The DynamoDB DeleteItem API is used to create a new item or to replace existing items completely with a new item. It is invoked using the delete-item CLI command .
You can easily modify or delete an item using the console by selecting the checkbox next to the item of interest, clicking the Actions dropdown and performing the desired action.