1
votes

I am facing a blocker and I am totally stuck. I use beanstalk with internal network load balancer. Then I use api gatway and vpc link integration to redirect any api calls to my beanstalk. so this way no one can directly call my beanstalk. Here is my api gtw set up:

enter image description here

And here is my vpc link set up:

enter image description here

Now when I execute api gateway I get:

enter image description here

But when I use a network load balancer but a public facing one everything works. However this does not make sense. The whole point of using vpc link is to be able to talk to internal facing load balancer. Am I making any mistake? Any help is appreciated.

1
Is your backend (EC2 server in your Elastic Beanstalk environment) running Apache Tomcat? Because that's what is in the error response, which leads me to believe that the traffic is actually making it to your backend. You might want to check the Tomcat logs to see why Tomcat is returning a 404 error on the /channels/stories path. Can you hit that path directly from another machine in your VPC?Mark B
@MarkB Thanks man. Very good catch. Yes I created the resource via cfn and I forgot to upload my code. Please add it as an answer.Hamed Minaee

1 Answers

1
votes

The requests are actually making it to your backend, as indicated by the Apache Tomcat 404 response. You need to make sure Tomcat is configured to serve up the path API Gateway is requesting.