title: AWS API Gateway simple http proxy Invalid endpoint address
body: <p>I am trying to use an AWS API gateway to configure simple http proxy, following the example from this page:
  <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-api-as-simple-proxy-for-http.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-api-as-simple-proxy-for-http.html</a>
  The issue I'm running into is that it seems to work if my endpoint URL is another AWS API gateway, but I can't get it to work for any other URL.</p>
  
  <p>I'm creating a proxy resource with resource path /{proxy+} and enabling API gateway CORS, then creating ANY method as HTTP Proxy and content handling passthrough (just like the petshop example in the above mentioned example). If I set my endpoint to be another AWS API gateway, it works.</p>
  
  <p>However, if I set my endpoint to be a non-AWS URL I get back a 500 response and I see in my API gateway Cloudwatch log:</p>
  
  <blockquote>
    <p>Execution failed due to configuration error: Invalid endpoint address</p>
  </blockquote>
  
  <p>My endpoint is on my internal company network, but as a test I also tried proxying to an Internet address and this failed with the same error. (I should note that in both cases, I am trying to proxy to an https address, not just http.)
  <a href="https://i.stack.imgur.com/94ftR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/94ftR.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/QhLgz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QhLgz.png" alt="enter image description here"></a></p>
  
  <p>In order to rule out a network routing or firewall issue I logged into an AWS EC2 instance in our same region and tested access to the endpoint URL via curl, and this was successful.</p>
  
  <p>Has anyone successfully used API gateway simple https proxy to anything other than another AWS API gateway?</p>