Delete/Update DynamoDB entries with AWS API
<p>I am trying to figure out how to make an API to allow for updating/deleting entries with the AWS API. Ideally. I want it so that when you call<code>'apijfkdlsfjdlaf.com.aws/delete/{idnumber}'</code>  It will delete that particular entry.</p>

<p>My integration requests calls DeleteItem from DynamoDB and  looks like:</p>

<pre><code>{
"TableName": "Blah",
"KeyConditionExpression": "blahID= :v1",
"ExpressionAttributeValues": {
    ":v1": {
        "S": "$input.params('blahID')"
    }
}
}
</code></pre>

<p>I am able to read/write entries, so I know my access control is setup appropriately, but when I test the delete command I receive the follwing:</p>

<pre><code>{
  "__type": "com.amazon.coral.validate#ValidationException",
  "message": "1 validation error detected: Value null at 'key' failed to satisfy constraint: Member must not be null"
}
</code></pre>

<p>And the logs: <a href="http://pastebin.com/M4sSGWUS" rel="nofollow">http://pastebin.com/M4sSGWUS</a> </p>

<p>Any help is appreciated.  </p>

<p>Edit:  I've changed the integration request to align with the documentation on their website:</p>

<pre><code>var AWS = require("aws-sdk");
var docClient = new AWS.DynamoDB.DocumentClient();

var table = "Blah";
var ID= "$input.params('blahID')";

var params = {
TableName:table,
Key:{
    "blahID":ID,
}
};

docClient.delete(params, function(err, data) {
   if (err) {
       console.error("Unable to delete item. Error JSON:",    JSON.stringify(err, null, 2));
   } else {
       console.log("DeleteItem succeeded:", JSON.stringify(data, null, 2));
   }
});
</code></pre>

<p>Now getting a <code>"__type": "com.amazon.coral.service#SerializationException"</code> error</p>