I want to use API Gateway to route between multiple microservices. E.g: domain.com/app1
, domain.com/app2
etc.
The problem is that routes such as domain.com/app1/hello
are redirected to internal.app1/app1/hello
instead of internal.app1/hello
.
app1
is not removed.It can be solved when I use HTTP redirection in API Gateway, but that requires an external load balancer which I want to avoid. I didn't see an option to use path variables with private ALB integration.
Please advise. Thank you in advance.
Problem is solved.
The solution is to use a REST API Gateway (instead of HTTP Gateway) integrated with a Network Load Balancer (NLB) via a VPC Link.
The AWS REST API in AWS API Gateway allows using path variables with private integration (in this case, the NLB).
Summary of the solution: