title: How to access HTTP headers for request to AWS API Gateway using Lambda?
body: <p>I see in the <a href="https://aws.amazon.com/api-gateway/faqs/">API Gateway FAQ</a> that it is possible to access the request headers sent to the API Gateway...</p>
  
  <blockquote>
    <p>If you already utilize OAuth tokens or any other authorization
    mechanism, you can easily setup API Gateway not to require signed API
    calls and simply forward the token headers to your backend for
    verification.</p>
  </blockquote>
  
  <p>However, I can find no example of how to do so in the documentation and it is unclear how to access this data using Lambda.</p>
  
  <p>I am able to set up an open API and gain access to the JSON object that is part of a POST (<a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started.html">Walkthrough: API Gateway and Lambda Functions</a>), but in order to implement a OAuth 2.0 style API with my own provider I need access to the "Authorization" header.</p>
  
  <p>My preference is to set this up using Lambda and Java 8, but an example using node.js would also be helpful in understanding how to accomplish this.</p>