I have a set of REST end point running on a EC2 instance (app-server). I am trying to access a REST end point from another EC2 instance(web-server) through an API gateway. These are my configuration/set of steps I have done
- Both app-server and web-server are in private VPC
- I have created a VPC end point to the private APC
- I have configured a NLB listening on port 80 and target group as app-server. Health check in the target group is fine. Registered target in the target group is private IP of app-server and port of an application hosting the REST end points.
- I ran this command from my web-server and got the expected response with status code 200
curl -i -v <nlb_dns>:80/testResource
- I have created VPC link for REST-APIs and pointed to above NLB
- I setup a REST API gateway with private API end point type.I created a resource for "testResource" and created a method GET pointing to VPC link. In the integration request setting of GET method, end point is <nlb_dns>:80.
- When I deploy and run the test from AWS console, I am getting this response
Wed Dec 20 08:05:19 UTC 2023 : Sending request to http://<nlb_dns>:80
Wed Dec 20 08:05:24 UTC 2023 : Execution failed due to configuration error: There was an internal error while executing your request
Wed Dec 20 08:05:24 UTC 2023 : Method completed with status: 500
- I have verified all the security group configurations. But no clue so far.
Thanks Antonio for your suggestions