We will learn about the Create, Retrieve, Update, and Delete operations on the DynamoDB table using the Java SDK.
CRUD operations
Create item
We will put items into the awsbootcamp table that we created in the previous section.
- Using AmazonDynamoDB:
Let's create an item using the AmazonDynamoDB object:
Map<String, AttributeValue> item = new HashMap<>();
item.put("id", new AttributeValue().withN("1"));
item.put("name", new AttributeValue().withS("Sunil"));
item.put("lastName", new AttributeValue().withS("Gulabani"));
createItem(tableName, item); ........ public void createItem(
String tableName,
Map<String, AttributeValue...