I am relatively new to AWS. I've been able to:
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?
internal
NLB, I get a warning message You are creating an internal Load Balancer, but there is an Internet Gateway attached to these subnets
... and then I run into the internal server error
problem.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?
I was able to create a NLB in a private subnet and create a VPC link. Private Subnets use network address translation (NAT) gateways, not internet gatways. Link: https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html
NLB
VPCLink
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With