code: private void keyOnlyPut(Class<?> clazz, String tableName, Key objectKey,
                              Method hashKeyGetter, Method rangeKeyGetter) {
          Map<String, AttributeValue> attributes = new HashMap<String, AttributeValue>();
          Map<String, ExpectedAttributeValue> expectedValues = new HashMap<String, ExpectedAttributeValue>();
  
          String hashKeyAttributeName = reflector.getAttributeName(hashKeyGetter);
          attributes.put(hashKeyAttributeName, objectKey.getHashKeyElement());
          expectedValues.put(hashKeyAttributeName, new ExpectedAttributeValue().withExists(false));
  
          if (rangeKeyGetter != null) {
              String rangeKeyAttributeName = reflector.getAttributeName(rangeKeyGetter);
              attributes.put(rangeKeyAttributeName, objectKey.getRangeKeyElement());
              expectedValues.put(rangeKeyAttributeName, new ExpectedAttributeValue().withExists(false));
          }
          attributes = transformAttributes(clazz, attributes);
          db.putItem(applyUserAgent(new PutItemRequest().withTableName(tableName).withItem(attributes)
                  .withExpected(expectedValues)));
      }
docs: Edge case to deal with the problem reported here:
  https://forums.aws.amazon.com/thread.jspa?threadID=86798&tstart=25
  <p>
  DynamoDB cannot process an updateItem request that only contains the key
  attribute(s), so we have to do a putItem. Somewhat confusingly, we also
  insist that an item with the key(s) given doesn't already exist. This
  isn't perfect, but we should be doing a putItem at all in this case, so
  it's the best we can do.