title: Is there REST API key equivalent in HTTP API Gateway?
body: <p>Using REST API (AWS API Gateway v1) we can use <code>X-API-Key</code> header in request and maintain API Key to control access to given endpoint.</p>
  <p>In AWS if I go to API Gateway and select REST API (v1) then under Resources I see: <code>API Key Required</code> and under API Keys I can find my key.</p>
  <p>Using <code>serverless</code> this can be configured like this:</p>
  <pre class="lang-yaml prettyprint-override"><code>provider:
    apiKeys:
      - my-api-key
  
  functions:
    hello:
      handler: handler.hello
      events:
        - http:
            path: /hello
            method: get
            private: true
  </code></pre>
  <p>But if I switch to <code>httpApi</code> then I get:</p>
  <pre class="lang-sh prettyprint-override"><code>Configuration warning at 'functions.hello.events[0].httpApi': unrecognized property 'private'
  </code></pre>
  <p>Moreover, in API Gateway, under HTTP API (v2) there are no API Keys anywhere.</p>
  <p>When I check documentation there is a big section about API Keys under REST API:
  <a href="https://www.serverless.com/framework/docs/providers/aws/events/apigateway" rel="nofollow noreferrer">https://www.serverless.com/framework/docs/providers/aws/events/apigateway</a>
  but API Gateway HTTP API has nothing about API keys:
  <a href="https://www.serverless.com/framework/docs/providers/aws/events/http-api" rel="nofollow noreferrer">https://www.serverless.com/framework/docs/providers/aws/events/http-api</a></p>
  <p>Is there REST API (API Gateway v1) API key <em>equivalent</em> in HTTP API (API Gateway v2)? Basically, I want to be able to use <code>X-API-Key</code> with HTTP API as in REST API.</p>