title: Passing YAML payload through API Gateway to Lambda Function
body: <p>I was wondering if one can actually pass YAML payload format using API Gateway POST method to AWS Lambda function. I don't want any models for the payload or any checking of the payload using templates. I just want to pass the data to Lambda in YAML format. Has anyone ever successfully achieved this?</p>
  
  <p>I was earlier using JSON payload to pass the payload to Lambda, but due to certain design issues I felt YAML format payload is better suited for the task. I tried passing the YAML payload in the request body but was getting the following error. I kept method request header as <strong>Accept:application/yaml</strong>. I kept request body Content Type in Method Request as <strong>application/yaml</strong>.</p>
  
  <pre><code>Thu Aug 15 23:47:58 UTC 2019 : Lambda invocation failed with status: 400. Lambda request id: 66991273-f3fd-427f-85a3-eafe4f94251b
  Thu Aug 15 23:47:58 UTC 2019 : Execution failed: Could not parse request body into json:
  </code></pre>
  
  <p>I also searched the documentation and couldn't find much about the same. I wonder if this is supported at all. 
  <a href="https://i.stack.imgur.com/j9yxm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j9yxm.png" alt="enter image description here"></a></p>