title: How to use Async and Await with AWS SDK Javascript
body: <p>I am working with the AWS SDK using the KMS libary. I would like to use async and await instead of callbacks.</p>
  
  <pre><code>import AWS, { KMS } from "aws-sdk";
  
  this.kms = new AWS.KMS();
  
  const key = await this.kms.generateDataKey();
  </code></pre>
  
  <p>However this does not work, when wrapped in an async function.</p>
  
  <p>How can i use async and await here?</p>