[英]Is it possible in AWS to put a Network Load Balancer in front of the API Gateway that has private endpoints?
I have the following challenge: we have a VPC with an ApiGateway::RestApi
with PRIVATE endpoints (they are only accessible via the VPC,- this is our client's requirement).我面临以下挑战:我们有一个带有
ApiGateway::RestApi
和 PRIVATE 端点的 VPC(它们只能通过 VPC 访问,这是我们客户的要求)。 So the idea is that NLB (accessible from anywhere in the world) will translate the traffic to the API.所以这个想法是 NLB(可从世界任何地方访问)将流量转换为 API。 Is it possible to implement it in AWS?
是否可以在 AWS 中实现它?
After reading the documentation, I made the following conclusions.阅读文档后,我得出以下结论。
There is no technical ability to add NLB in front of the API Gateway in AWS.在 AWS 的 API 网关前添加 NLB 是没有技术能力的。 In the documentation they provide approach when API Gateway connects to the Network Load Balancer via VPCLink, but not vice versa.
在文档中,他们提供了 API 网关通过 VPCLink 连接到网络负载均衡器时的方法,反之则不然。 If you try putting NLB in front of API Gateway you should add this API Gateway to a NLB Target group.
如果您尝试将 NLB 放在 API Gateway 前面,则应将此 API Gateway 添加到 NLB 目标组。 NLB routes requests to the registered targets in its target group.
NLB 将请求路由到其目标组中的已注册目标。 But API Gateway does not belong to any available target type: Instances, IP addresses, Lambda function, Application Load Balancer.
但 API Gateway 不属于任何可用的目标类型:实例、IP 地址、Lambda 函数、Application Load Balancer。 So, it can not be added to any target group.
因此,它不能添加到任何目标组。 I will suggest considering the alternative of using NLB in front of API Gateway.
我会建议考虑在 API Gateway 前使用 NLB 的替代方案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.