title: How to invoke Lambda function with Event Invocation Type via API Gateway?
body: <p>Docs says:</p>
  
  <blockquote>
    <p>By default, the Invoke API assumes RequestResponse invocation type. You can optionally request asynchronous execution by specifying Event as the InvocationType. </p>
  </blockquote>
  
  <p>So all I can send to my function (python) is InvocationType:Event everywhere:</p>
  
  <pre><code>curl -X POST "https://X.execute-api.us-east-1.amazonaws.com/prod/Y?InvocationType=Event" 
  -d "InvocationType:Event" 
  -H "X-Amz-Invocation-Type:Event"
  
  (function sleeps 3 seconds then responses)
  
  null
  </code></pre>
  
  <p>But is not Async... docs also says:</p>
  
  <blockquote>
    <p>When you invoke a Lambda function via the AWS console or over HTTPS using Amazon API Gateway, Lambda always uses the RequestResponse invocation type.</p>
  </blockquote>
  
  <p>I know that can be possible via aws-CLI, what I dont understand if it is possible to do it from API Gateway endpoint.</p>