Given the following ALB dns:
and the following containers running in ECS:
I configured it in a way that I can route traffic coming through the ALB via path rewriting to the respective service in my ECS cluster:
my-alb-dns.com:80/container-a/my/endpoint -> container-a:8080/my/endpoint
my-alb-dns.com:80/container-b/my/endpoint -> container-b:8080/my/endpoint
This works fine (by using an nginx) but I was asking myself, if using an additional nginx server is really neccessary to achieve path rewriting. Are there any plans to extend the ALB functionality by custom path-rewrite rules? So far I could not find anything about it in the documentation.
I also took a look at Lamda@Edge but it seems to me a little bit overkill to introduce CloudFront with Lamda just for simple rewriting (which as comparison takes in nginx 1 line of configuration).
Are there any best practices about this or should I keep hoping that AWS will implement it in the distant future and just stick with my current nginx solution?