platform-engineeringgovernancecost-optimizationfinops

Sandbox account budgets that actually stop the spending

Sandbox accounts exist so engineers can experiment without asking permission. They also produce the most spectacular surprise bills, because nothing stops a forgotten GPU instance. Here is how to enforce a budget rather than merely alerting on one.

The C3X Team··7 min read

Quick answer

Budget alerts notify, they do not stop spending, so a sandbox needs enforcement: service control policies that block expensive instance families and regions, a nightly reaper that stops or deletes untagged and expired resources, automated shutdown outside working hours, and an escalation that revokes create permissions when a threshold is passed. A single forgotten 8 GPU instance at about 32 dollars an hour is roughly 23,000 dollars a month, which no alert alone prevents.

Sandbox accounts are a good idea. Engineers need somewhere to try things without a ticket, and the learning that happens there pays for itself. What makes them dangerous is that the same freedom applies to resources that cost 32 dollars an hour, and nothing in a default cloud account says no.

A budget alert fires after the money is spent. If your sandbox strategy stops at alerts, you have a notification system, not a budget.

What a sandbox can cost when nothing stops it

Forgotten resourceHourlyLeft for a month
8 GPU training instanceAbout 32 dollarsAbout 23,000 dollars
Large memory optimized instanceAbout 3.20 dollarsAbout 2,300 dollars
Managed cluster with 5 nodesAbout 0.60 dollarsAbout 430 dollars
Data warehouse clusterAbout 3.00 dollarsAbout 2,160 dollars
NAT gateway plus load balancerAbout 0.07 dollarsAbout 50 dollars

The top row is the one that ends up in a postmortem. It is rarely malicious, just a Friday experiment nobody remembered on Monday, and a monthly billing cycle means the damage is done before anyone looks.

Prevent first with policy

The cheapest control is denying what should never happen. Service control policies or equivalent org level guardrails can block GPU and other high cost instance families, restrict usage to one or two regions, block reserved capacity and commitment purchases, and deny creation of services the sandbox has no business using.

Region restriction alone prevents a whole class of incident, because resources created in an unexpected region are the ones nobody finds during cleanup. Denial is instant, needs no monitoring loop, and does not depend on anyone reading an email. Where an exception is genuinely needed, grant it per request with a time limit.

Reap on a schedule

Prevention cannot cover everything, so add a reaper. A nightly job that stops or terminates instances tagged for sandbox use, deletes resources past their expiry tag, and removes anything untagged after 24 hours keeps the account roughly empty by default.

Make the default lifetime short, 24 to 72 hours, with a simple extension mechanism for work that needs to persist. Warn owners in chat before deletion so the reaper feels like a service rather than an ambush, and make sure the sweep covers the expensive stragglers: volumes, snapshots, elastic IPs, load balancers, and idle clusters.

Stop things overnight and at weekends

Sandbox usage follows working hours almost perfectly. Stopping non production compute outside a 10 hour weekday window cuts runtime from 730 hours a month to about 220, a 70 percent reduction, with no impact on anyone's work.

Schedule the stop aggressively and let engineers restart what they need, since a restart is a button and a forgotten instance is a bill. This is the same lever described inscheduled scaling for dev environments, applied to an account where nothing should ever be running overnight.

Per engineer budgets beat one shared pool

A single sandbox account with a 20,000 dollar budget shared by 60 engineers gives nobody a reason to be careful, because any individual's spending is invisible inside the total. Vending one small account per engineer or per small team, each with a 200 to 500 dollar monthly budget, changes the incentive completely.

It also makes enforcement safe to automate. Suspending resource creation in one engineer's sandbox at 100 percent of a 300 dollar budget affects one person for a few hours, while doing the same to a shared account blocks everyone. The per account baseline is the cost of this approach, so keep sandbox baselines minimal, no full configuration recording, no dedicated egress path, and a lightweight detection profile.

Escalate when the threshold is crossed

Give the budget teeth. Wire budget events to automation rather than only to email: at 50 percent of budget notify the owner, at 80 percent notify the team lead, at 100 percent attach a policy that denies creation of new resources, and at 120 percent stop running compute.

Publish the ladder in advance so nobody is surprised, and keep a documented path to raise a budget for legitimate work. The point is that the account cannot run away on its own while everybody is looking at something else.

Give engineers the number before they create

Enforcement works better alongside information. Most sandbox overspending comes from not knowing the hourly rate of the thing being created, and a quick estimate changes the choice.

Where sandbox work is done through Terraform, c3x prices the plan statically with no cloud credentials, so an engineer sees "this plan costs about 23,000 dollars a month" before applying it. That single line prevents more incidents than any alert, because it arrives at the moment of the decision. Combine prevention by policy, a nightly reaper, scheduled shutdown, an escalation ladder, and a cost estimate at creation time, and a sandbox becomes what it should be: a place to learn quickly, with a ceiling nobody has to police manually.

FAQ

Why are budget alerts not enough for sandbox accounts?

Because alerts notify after the money is spent. A forgotten 8 GPU instance at about 32 dollars an hour is roughly 23,000 dollars a month, and a monthly billing cycle means the damage is done before anyone investigates. Effective sandbox budgets need prevention through policy, automated reaping, scheduled shutdown, and an escalation that actually revokes create permissions.

What should a sandbox account block by policy?

High cost instance families such as GPU and large memory optimized types, regions outside the one or two you actually use, reserved capacity and commitment purchases, and services the sandbox has no business using. Region restriction alone prevents a common incident class, because resources created in an unexpected region are the ones nobody finds during cleanup.

How should a sandbox reaper work?

A nightly job that stops or terminates instances tagged for sandbox use, deletes resources past their expiry tag, and removes anything untagged after 24 hours. Default lifetimes of 24 to 72 hours with an easy extension keep the account roughly empty. Warn owners in chat before deletion, and make sure the sweep covers volumes, snapshots, elastic IPs, load balancers, and idle clusters.

How much does scheduled shutdown save in a sandbox?

About 70 percent of compute runtime. Stopping non production compute outside a 10 hour weekday window reduces runtime from roughly 730 hours a month to about 220. Sandbox usage tracks working hours almost perfectly, so the impact on actual work is negligible, and restarting is a button press while a forgotten instance is a bill.

How do I stop expensive sandbox resources from being created at all?

Combine policy denial with information at the moment of creation. Where sandbox work runs through Terraform, C3X prices the plan statically with no cloud credentials, so an engineer sees that a plan costs about 23,000 dollars a month before applying it. That single line prevents more incidents than any alert, because it appears while the decision is still being made.

What to do next

Show the hourly rate before the experiment runs. C3X prices Terraform plans with no cloud credentials. Start with the quickstart.

Try C3X on your own Terraform

Free and open source. No API key required. One command to install, one command to estimate.