Every feature branch gets its own environment - one small always-on service, a managed NAT gateway, a load balancer and a small managed database. Roughly what does one idle environment cost per month at 2026 cloud list prices, and what does that imply for 60 open branches?
Show the full answer Hide the answer
The assumptions, stated
Idle means no traffic: the arithmetic is about what you pay for existing, not for serving. Prices are US-region list rates as published in 2026, before any discount.
The arithmetic, one line at a time
- Managed NAT gateway. Roughly \(0.045 an hour in a major US region in 2026, which is about **\)33 a month per availability zone**. A two-AZ setup is about \(66, and the data-processing charge of roughly \)0.045/GB applies on top of any traffic.
- Application load balancer. Roughly \(0.0225 an hour, about **\)16 a month**, plus capacity units that round to nothing when idle.
- Small managed database. A burstable instance with a little storage is roughly $15–30 a month.
- The service itself. A small always-on instance or container is roughly $15–30 a month.
One idle environment is therefore on the order of \(100–150 a month.** Sixty open branches is **roughly \)6,000–9,000 a month, close to $100,000 a year, for environments that are idle overnight, at weekends, and for most of the working day.
Which assumption dominates the error
Not the unit prices. How long an environment lives dominates everything. A branch open for 3 days costs a tenth of one open for 30 days, and nothing in the design stops an environment outliving the pull request that created it. That is the common failure: the branch merges, the environment does not notice, and it bills for months. The second-largest term is the NAT gateway, because it is the one component with no idle-scaling path: it costs the same asleep as awake.
What the number rules in or out
It rules out permanent per-developer environments as a default. It rules in three cheap changes: expire environments automatically after a period of inactivity rather than on branch deletion, share one NAT path across all preview environments instead of one each, and stop the database and compute outside working hours, which removes about two thirds of the remaining hours.
It also reframes the conversation. $100 a month per environment sounds like nothing in a design review, which is exactly why the floor is never modelled. The multiplier is what matters.
When this is the wrong answer
If the environment contains a GPU, a licensed product with a per-environment fee, or a production-sized dataset copy, the floor is dominated by that item and the networking arithmetic is noise. Model the expensive component first and ignore the rest.
If the team has fewer than about 10 open branches at a time, the total is small enough that engineering time spent on automatic expiry costs more than it saves. Choose the manual path below 10 concurrent environments and build the timer above 20, because that is where the annual figure passes an engineer-week.
Common weak answers
- "Use serverless so idle costs nothing." The compute may scale to zero; the NAT gateway, the load balancer and the managed database do not, and those are most of the floor.
- "Tear environments down at the end of the sprint." Manual cleanup decays within two sprints. The control has to be a timer, not a habit.