title: How do I promisify the AWS JavaScript SDK?
body: <p>I want to use the aws-sdk in JavaScript using promises. </p>
  
  <p>Instead of the default callback style:</p>
  
  <pre><code>dynamodb.getItem(params, function(err, data) {
    if (err) console.log(err, err.stack); // an error occurred
    else     console.log(data);           // successful response
  });
  </code></pre>
  
  <p>I instead want to use a <a href="http://wiki.commonjs.org/wiki/Promises">promise</a> style:</p>
  
  <pre><code>dynamoDb.putItemAsync(params).then(function(data) {
    console.log(data);           // successful response
  }).catch(function(error) {
    console.log(err, err.stack); // an error occurred
  });
  </code></pre>