AWS API Gateway Proxy Response failure/dropped
<p><strong><em>Problem</em></strong>: </p>

<p>AWS API Gateway Proxy is not passing back the response from my backend service when using Postman, but works on curl</p>

<p><strong><em>Description</em></strong>:</p>

<p>I have a backend service that I want to exposed via AWS API gateway. The use of gateway in this case is purely as a HTTP proxy. So,</p>

<ol>
<li>Created a new API</li>
<li>Set the Resource as "Proxy" using ANY</li>
<li>Gave my backend service address</li>
<li>Deployed it (No Auth required, but API Key is needed though)</li>
<li>Could call my backend service from the deployment stage url successfully</li>
<li>Create a custom domain using a CA cert</li>
<li>Created an Alias on my DNS provider</li>
<li>1hr later the Domain is up and working pointing to the cloudfront</li>
</ol>

<p><strong>Issue</strong></p>

<p>I made a call to the custom domain, </p>

<ol>
<li>API gateway received it</li>
<li>Call is logged in the cloudwatch logs, and </li>
<li>It is hitting my Backend. </li>
<li>Backend replied to API gateway. </li>
</ol>

<p>But, on my postman, I see a <em>"Could not get any response"</em></p>

<p>However, If I try this via <code>curl</code>, I am getting the intended response back that was sent by my backend. So, the unclear part is - </p>

<ol>
<li><p>What is wrong with Postman call or a normal browser url bar based GET to my endpoint?</p></li>
<li><p>Why is curl successful?</p></li>
<li><p>and, for my API Gateway endpoint, I have set API Key as mandatory. I have created an API key and assigned it to the API. Interesting part is that, the curl call is still successful even if I do not pass an API Key. Why could API Gateway allow such calls ?</p></li>
<li><p>Another confusing issue for me is, I have to pass custom values in the <code>Accept</code>, and <code>Content-Type</code> that I use for my API versioning. </p></li>
</ol>

<p>Ex: <code>Accept: application/json-v1</code> is failing but <code>Accept: application/xml-v1</code> is working.</p>

<p>I think this is something to do with value as API Gateway is not liking it. </p>

<p>I have read through the docs thoroughly and still could not find any reasonable explanation for all these issues. What am I missing that is causing these weird bag of issues ? My google fu so far too was not enough to solve this.</p>

<p>Please help or equally point me to the specific docs in AWS gateway that can help solve this or any discussion threads that I may have missed on these topics. </p>

<p>At least getting an answer for one of these will give me a clarity on my approach.</p>

<p>thanks people!</p>