title: How do you elegantly import AWS - Lambda in Typescript?
body: <p>I am building a typescript project on aws lambda. As <code>aws-sdk</code> comes with type definitions already I would expect it also to hold a definition for aws lambda. But I seem to have to install <code>@types/aws-lambda</code> separately for it to work.</p>
  
  <pre><code>//import { Lambda } from "aws-sdk";
  import { Context } from "aws-lambda";
  
  module.exports.hello = async (event:any, context:Context) =&gt; {
    return {
      statusCode: 200,
      body: JSON.stringify({
        message: 'function executed successfully!',
        input: event,
      }),
    };
  };
  </code></pre>
  
  <p>I would expect something like this being possible:</p>
  
  <pre><code>import { Lambda } from "aws-sdk";
  
  module.exports.hello = async (event:any, context:Lambda.Context) =&gt; {
    return {
      statusCode: 200,
      body: JSON.stringify({
        message: 'function executed successfully!',
        input: event,
      }),
    };
  };
  </code></pre>
  
  <p>but it is not ;)</p>
  
  <p>So How do I do it correctly?</p>