title: DynamoDB updateItem in Lambda fails silently
body: <p>I'm attempting to implement a simple counter with a Lambda function, but whenever I test it, the updateItem below simply does not work: none of the log statements in the callback are run at all, and of course the relevant counter in the table is never updated.  Here's my lambda function:</p>
  
  <pre><code>'use strict';
  const AWS = require('aws-sdk');
  const dynamodb = new AWS.DynamoDB({ apiVersion: '2012-08-10' });
  
  let params = {
      TableName: 'Counters',
      Key: {
          'name': { S: 'global' }
      },
      UpdateExpression: 'SET val = val + :inc',
      ExpressionAttributeValues: {
          ':inc': { N: '1' }
      },
      ReturnValues: 'ALL_NEW'
  };
  
  exports.handler = async(event) =&gt; {
      console.log("Invoked counter-test");
  
      dynamodb.updateItem(params, function(err, data) {
          console.log("In updateItem callback");
          if (err)
              console.log(err, err.stack);
          else
              console.log(data);
      });
  
      console.log("Updated counter");
  
      const response = {
          statusCode: 200,
          body: JSON.stringify('Counter updated'),
      };
      return response;
  };
  
  </code></pre>
  
  <p>And here's the output of the test:</p>
  
  <pre><code>Response:
  {
    "statusCode": 200,
    "body": "\"Counter updated\""
  }
  
  Request ID:
  "80e92299-2eea-45e4-9c68-54ccf87199c5"
  
  Function Logs:
  START RequestId: 80e92299-2eea-45e4-9c68-54ccf87199c5 Version: $LATEST
  2019-05-07T11:34:21.931Z    80e92299-2eea-45e4-9c68-54ccf87199c5    Invoked counter-test
  2019-05-07T11:34:21.934Z    80e92299-2eea-45e4-9c68-54ccf87199c5    Updated counter
  END RequestId: 80e92299-2eea-45e4-9c68-54ccf87199c5
  REPORT RequestId: 80e92299-2eea-45e4-9c68-54ccf87199c5  Duration: 275.91 ms Billed Duration: 300 ms     Memory Size: 128 MB Max Memory Used: 67 MB  
  </code></pre>
  
  <p>As you can see, no log statements from the updateItems callback ran.</p>
  
  <p>If I try to update the counter from the command line using <code>aws dynamodb</code> it does work, however:</p>
  
  <pre><code>$ aws dynamodb update-item \
    --table-name Counters \
    --key '{"name": { "S": "global" }}' \
    --update-expression 'SET val = val + :inc' \
    --expression-attribute-values '{":inc": {"N": "1"}}' \
    --return-values ALL_NEW \
    --output json
  {
      "Attributes": {
          "name": {
              "S": "global"
          },
          "val": {
              "N": "129"
          }
      }
  }
  </code></pre>