title: API Gateway - Post multipart/form-data from
body: <p>I am trying to get the form data from a <em>multipart/form-data</em> POST to my AWS Http Body Mapping Templates web service.</p>
  
  <p>The HTTP POST request (using postman) has Content-Type "<em>multipart/form-data</em>" and body is form-data with 3 key-value contents that one of them is File.</p>
  
  <p>If I call the http endpoint directly (not through the API gateway) - using postman or mobile, it works as expected, however, using the API gateway endpoint (through postman) fails.</p>
  
  <p>My server method is:</p>
  
  <pre><code>public ResponseEntity MethodName(MultipartHttpServletRequest request) {...}
  </code></pre>
  
  <p>But my request even entered to my method body and throws an exception <code>"Could not parse multipart servlet request; nested exception is java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadException: the request was rejected because no multipart boundary was found"</code>. </p>
  
  <p>I have also tried setting the <em>Http -> Integration Request -> Body Mapping Templates</em> for content type <em>multipart/form-data</em> (with content <code>{"body" : "$input.body"}</code> or <code>{"body" : $input.body}</code>) to Input passthrough. This didn't help either.</p>