I have an AWS ECS Task with 2 containers: A Golang application and an Envoy proxy. The flow should be something like this:
Go --> GET site.com --> Envoy proxy intercepts it --> GET newsite.com
So, in the end, I would like to redirect the Golang app to the newsite.com.
I can achieve it on Kubernetes using Iptables, like this:
Go --> GET site.com --> Iptables PREROUTING to Envoy proxy --> Envoy proxy intercepts it --> GET newsite.com
So in Kubernetes, it acts as a transparent proxy, but I don’t know how to achieve the same behavior on AWS ECS (Fargate and EC2).