
Hook: I just found out AWS is paying for AWS's cost mistakes — you're not, starting now. ECS Gateway kills the one-ALB-per-service tax almost nobody questions.
Open your AWS bill, filter by Application Load Balancer, and count the line items. If you run more than a handful of ECS services, there's a good chance you're paying for one ALB per service — each one sitting mostly idle, each one billed every hour whether it's forwarding ten requests a second or ten a day. On October 20, 2026, AWS shipped Amazon ECS Gateway, a fully managed ingress layer that lets up to 25 services share a single ALB. No extra charge for the gateway itself. This is the rare AWS launch that's a straight cost cut, not a new SKU — so let's actually do the math and then migrate a real service.
The line item nobody audits
Here's how the sprawl happens. Someone spins up a new ECS service, needs a load balancer in front of it, and the fastest path is loadBalancers in CreateService pointing at a brand-new ALB. It works. Six months later you have 20 services and 20 ALBs, most of them fronting internal APIs that get a trickle of traffic. Each one still costs the same base hourly rate plus LCU (Load Balancer Capacity Unit) charges, regardless of how little it's doing.
At roughly $0.0225/hour for the ALB itself (about $16/month) plus LCU usage, 20 ALBs that are each 90% idle is easily $300–400/month in base charges alone before you've served a single meaningful request — and that's before certificates, CloudWatch metrics, and the Route 53 records most teams create per-ALB on top of it.
What ECS Gateway actually is
ECS Gateway is an account-level resource that provisions and owns the ingress networking — ALBs, ACM certificates, security groups, listener rules, and target groups — so your team stops hand-rolling one per service. It splits cleanly into two roles:
- Platform teams create the gateway once: subnets, security groups, TLS, WAF web ACL, and scheme (internet-facing or internal).
- Application teams opt a service in by adding a
gatewayConnectorsentry toCreateServiceorUpdateService. That's it — no ALB to provision, no target group to wire up.
Nothing is provisioned until the first service actually connects. Create the gateway:
aws ecs create-gateway \
--name platform-shared-gateway \
--infrastructure-role-arn arn:aws:iam::123456789012:role/ECSGatewayRole \
--configuration '{
"hostSharedAlb": {
"networkConfiguration": {
"subnets": [
"subnet-080779f9bd887757a",
"subnet-03d5b2fead6bc6258"
],
"ipAddressType": "ipv4"
},
"scheme": "internet-facing"
}
}'Then attach it to the clusters that should use it:
aws ecs associate-gateway-with-cluster \
--gateway platform-shared-gateway \
--cluster arn:aws:ecs:us-east-1:123456789012:cluster/prod-clusterA gateway can associate with up to 10,000 clusters, and a cluster can carry up to five gateway associations — so this isn't a one-gateway-per-account constraint. Name, scheme, subnets, IP address type, and listener protocol/port are locked in at creation, so get those right up front.
The numbers that actually move your bill
- 25 services share one ALB, routed by host header — one listener rule per service, not configurable higher.
maxAlbCountdefaults to 10, giving you headroom for up to 250 services under one gateway before you'd need to raise it or spin up a second gateway.- When every ALB under the gateway is full and
maxAlbCountis reached, the next deployment that needs a new ALB fails — it doesn't silently queue, so sizemaxAlbCountwith some headroom. - ALBs are created on demand as services connect and deprovisioned automatically once the last route on them is removed — you don't clean up orphaned ALBs by hand anymore.
Run the math on the sprawl example above: 20 services at one ALB each becomes roughly 20 services across as few as one ALB (well under the 25-service cap), replacing 20 base hourly charges with one. That's the entire cost story — you still pay for the ALBs, certificates, CloudWatch data, and data transfer the gateway provisions, you just stop paying for 19 ALBs that exist only because nobody consolidated them.
Migrating a real service without downtime
This is the part most teams get nervous about, so here's the actual sequence AWS documents for moving a service that already has its own loadBalancers block onto the gateway:
- Add a
gatewayConnectorsentry to the service viaUpdateService. ECS creates a new route and a new hostname — it does not touch your existing load balancer. - Both ingress paths are now live at once. Hit the new gateway hostname directly and confirm the service responds correctly through it.
- Once you've verified it, point clients (or your Route 53 record / internal service discovery) at the new hostname.
- In a later deployment, remove the old
loadBalancersblock. ECS deprovisions that dedicated ALB if nothing else is using it.
aws ecs update-service \
--cluster prod-cluster \
--service checkout-api \
--gateway-connectors '[
{
"portName": "api",
"filters": { "accessTypes": ["PUBLIC"] }
}
]'A few things that will bite you if you skip them:
- Only
awsvpcnetwork mode is supported — works across EC2, Fargate, and ECS Managed Instances, but if you're still onbridgemode you'll need to move off it first. - The service's subnets' AZs have to be a subset of the gateway's AZs on that cluster — mismatch there and the connection just won't form.
- The hostname ECS generates is a random
https://<unique-id>.ecs.<region>.on.aws— it is not derived from your service name, so you still need your own DNS/CNAME layer in front of it if you want a branded URL. - If you ever change the service's health check, that swaps the target group, which means the deployment has to go through
BLUE_GREENorCANARY— a plainROLLINGupdate will reject it. - If a service should never be reachable from the internet, set
filters.accessTypestoPRIVATEexplicitly. Leave it unset and a later internet-facing gateway association on that cluster can expose it on the next deploy.
Audit your own ingress setup
Before you touch anything, run this against your own account and actually look at what comes back:
aws elbv2 describe-load-balancers \
--query 'LoadBalancers[].{Name:LoadBalancerName,ARN:LoadBalancerArn,Scheme:Scheme}' \
--output tableCross-reference that list against your ECS services. Every ALB fronting exactly one ECS service with low, steady traffic is a candidate for consolidation under a gateway. You don't have to migrate everything at once — the dual-path migration above means you can move one low-risk internal service first, watch it for a few days, and then work through the rest of the list. The savings scale with how much sprawl you've actually got, but for most teams running double-digit ECS services, this is a real, boring, no-tradeoff cost win — which is exactly the kind worth doing first.

Experienced DevOps Engineer proficient in Python, Docker, Kubernetes, CI/CD, and cloud technologies. Specialized in automating processes and building scalable infrastructure for seamless development and deployment.


