title: How to pass conditional check if item does not exist with UpdateItem request in AWS DynamoDB
body: <p>Is it possible to run an UpdateItem request against Amazon DynamoDB with an condition that will always succeed if the item does not yet exist. For example:</p>
  
  <pre><code>long timestampNow = System.currentTimeMillis();
  
  UpdateItemSpec updateItemSpec = new UpdateItemSpec()
          .withPrimaryKey("primary_key", theKey)
          .withReturnValues(ReturnValue.ALL_NEW)
          .withAttributeUpdate(
                  new AttributeUpdate("my_attr").put(timestampNow+SOME_DURATION))
          .withExpected(
                  new Expected("my_attr").lt(timestampNow)); 
  try {
      UpdateItemOutcome outcome = AWS.DYNAMO_DOC.getTable("my_table").updateItem(updateItemSpec);
      return outcome.getUpdateItemResult().getAttributes();
  
  } catch (ConditionalCheckFailedException e) {
      return null;
  }
  </code></pre>
  
  <p>When I make requests for items that don't exist yet, it throws <code>ConditionalCheckFailedException</code>, but I'd like it pass the condition test and just go ahead and create the item. Is that possible?</p>