We were waiting for this one a long time! AWS Application Load Balancer now supports routing requests based on Host header. Up until now ALB passed HTTP requests to ECS services only based on request path patterns.
The main difference is that now you can deploy a single ALB to distribute requests to many services, each of them running on a subdomain, a path or their combination.
Application Load Balancer enables ECS to transparently map load
balancer listeners to container ports. Before AWS introduced the new
host-header feature, ALB had
deployed for each subdomain, which was potentially wasteful and expensive. Currently we deploy one ALB per
domain, due to the limit of one SSL certificate per ALB. Much better granularity.
Terraform supports routing via
path-pattern already, so you can start using it today in your