List<WriteRequest> rList = new ArrayList<WriteRequest>();
List<Map<String, AttributeValue>> resultList;
// Amazon DynamoDB only allows one operation per item in a bulk insertion (no duplicate items)
Set<Map<String, AttributeValue>> uniqueItems = uniqueItems(buffer.getRecords());
for (Map<String, AttributeValue> item : uniqueItems) {
WriteRequest wr = new WriteRequest().withPutRequest(new PutRequest().withItem(item));
// add to the map
requestMap.put(wr, item);
// add to the list of requests
rList.add(wr);
// Max of sixteen not to exceed maximum request size