title: Passing a null AttributeValue into DynamoDb using AWS low level API
body: <p>I'm attempting to update an item within a DynamoDB table using the C# low-level API as documented <a href="http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LowLevelDotNetItemCRUD.html#UpdateItemLowLevelDotNet" rel="nofollow">here</a></p>
  
  <p>Here is my attempt at achieving this:</p>
  
  <pre><code>var response = DynamoClientProvider.Current.UpdateItem(new UpdateItemRequest
  {
      TableName = "MyTable",
      Key = {{"TableId", new AttributeValue {S = "12345"}}},
      ExpressionAttributeNames =
      {
          {"#T","Timestamp"},
          {"#D","Data"}
          {"#K","MyKey"}
      },
      ExpressionAttributeValues =
      {
          {":Timestamp", new AttributeValue("2016-2-3 00:00:00.000")},
          {":Data", new AttributeValue("some data")}
          {":MyKey", new AttributeValue("some other data")}
      },
      UpdateExpression = "SET #D = :Data, #T = :Timestamp, #K = :MyKey",
      ConditionExpression = "attribute_not_exists (Data)",
      ReturnValues = ReturnValue.ALL_OLD
  });
  </code></pre>
  
  <p>This code works just fine, however there is an issue when <code>MyKey</code> is an empty string.  When this is empty, I get the following error:</p>
  
  <blockquote>
    <p>Amazon.DynamoDBv2.AmazonDynamoDBException: ExpressionAttributeValues
    contains invalid value: Supplied AttributeValue is empty, must contain
    exactly one of the supported datatypes for key :MyKey</p>
  </blockquote>
  
  <p>I have therefore attempted to therefore pass in a null <code>AttributeValue</code> in order to delete the attribute in this case by setting it to the following:</p>
  
  <pre><code>new AttributeValue{NULL = true}
  </code></pre>
  
  <p>However this instead will set the value to be the string literal of <code>True</code></p>