我是AWS的新手。我能够:
为了学习,我想在API网关和EC2实例之间放置一个网络负载均衡器(NLB)。之后,我想尝试自动缩放组(以便了解如何扩展/扩展EC2实例)。
但是我被困在NLB上了。添加后,对API Gateway端点的请求只返回internal server error
。
问题
我是否应该使用internal
或internet-facing
NLB将请求从API网关路由到EC2实例?
internal
NLB时,收到警告消息You are creating an internal Load Balancer, but there is an Internet Gateway attached to these subnets
...然后我遇到了internal server error
问题。internet-facing
NLB时,API Gateway警告我“你的NLB已经面向公众,因此可能不需要使用VPC Link”。有人能说清楚我应该做些什么吗?
答案 0 :(得分:0)
我能够在专用子网中创建NLB并创建VPC链接。专用子网使用网络地址转换(NAT)网关,而不是Internet网关。 链接:https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html