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
preguntada hace 3 meses185 visualizaciones
1 Respuesta
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
EXPERTO
Uri
respondido hace 3 meses
profile picture
EXPERTO
revisado hace un mes
  • 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.

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas