I am relatively new to AWS. I've been able to:
- Setup edge-optimized API Gateway endpoints (w/a custom domain ... install an SSL cert, etc.)
- Route requests from API Gateway to a server running on an EC2 instance via HTTP proxy
For learning, I'd like to put a Network Load Balancer (NLB) between API Gateway and the EC2 instance. After that, I want to experiment with Auto-Scaling Groups (in order to see how EC2 instances can be scaled out/in).
BUT I'm stuck on the NLB. After adding it in, requests made to API Gateway endpoints simply return internal server error
.
Question
Should I be using an internal
or internet-facing
NLB to route the requests from API Gateway to the EC2 instances?
- When I opt to use an
internal
NLB, I get a warning messageYou are creating an internal Load Balancer, but there is an Internet Gateway attached to these subnets
... and then I run into theinternal server error
problem. - When I setup an
internet-facing
NLB, API Gateway warns me something to the effect of, "Your NLB is already public-facing, so the use of a VPC Link might be unnecessary".
Can someone shed some light on what I should be doing?