Amazon API Gateway - VPC Link - NLB - Ingress Controller

0

I'm trying to deploy an API Gateway with a private integration that uses VPC Link. The Network Load Balancer, that the VPC Link is connecting to, was provisioned by Nginx Ingress Controller. The idea is to use one Load Balancer to call different microservices on EKS but for this I need to pass correct Host header with my request to route it to the correct microservice. The configuration of the VPC Link integration with API Gateway has a parameter called "Endpoint URL" that is supposed to be useful exactly for this purpose, to be passed as the Host header but it looks like the domain of this URL can't be a random private domain and has to end with the valid TLD like .com. Is it correct? I couldn't find infomation about it in the documentation (https://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-with-private-integration.html). The problem is that it breaks the domain naming schema that I was going to use because every time I try to put my internal domain of Route53, it gives this error "Invalid HTTP endpoint specified for URI" and so I have to switch to use public domain in my internal ingress instead of using my internal domain which doesn't make much sense. Why is there this limitation if this URL is used solely for the purpose of being the Host header value? And are there any ways of overcoming it?

Savva
已提问 3 个月前184 查看次数
1 回答
0

You can actually override the value of the Host header in the Integration Request. Saying that, are you sure that NLB supports Host based routing? If I am not mistaken, you can only do port base routing in NLB, unless there is an ALB behind the NLB, that supports host base routing.

profile pictureAWS
专家
Uri
已回答 3 个月前
profile picture
专家
已审核 1 个月前
  • It's Ingress Controller that does routing in this case, not NLB.

  • So try overriding the Host header.

  • Is it possible to overwrite Host header in the VPC link integration? I've tried but it didn't work. Seems like it's not a problem to add or overwrite some custom header, but Host header is still being equal to the Endpoint URL despite the assignment in the mapping template.

  • Should be possible to override.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则