How to avoid a surprise cloud or API bill when free credits run out
Budgets, alerts, hard caps and kill switches on Google Cloud, AWS, Azure and OpenAI, plus the NAT gateway, egress, idle GPU and leaked API key traps.
A budget alert won’t save you. On Google Cloud, AWS and Azure a budget sends an email and nothing else, all three providers say so themselves, and the email can arrive a full day after the spending happened. The only things that actually stop spending are a spending limit (Azure free accounts), a hard spend limit (OpenAI and Anthropic), a prepaid balance (OpenRouter and xAI), or a kill switch you build yourself. This guide covers what each console offers and the five traps behind most surprise bills. Everything here was checked against the providers’ own documentation on November 2, 2026.
First, find out whether you can be charged at all
Trial accounts are safer than people fear. On Google Cloud you aren’t billed for any usage during the trial, and billing starts only when you manually upgrade to a paid billing account; otherwise the trial billing account closes when the $300 is spent or 90 days pass. The AWS free account plan can’t incur charges and simply closes at six months. An Azure free account carries a spending limit equal to its $200 credit, and resources are stopped and deallocated when it’s reached.
The danger starts when you upgrade: the Activate button on Google Cloud’s Welcome page, the paid plan on AWS, or removing the spending limit on Azure. From that moment every resource outside the always-free limits bills to your card once credits are gone, so treat the upgrade as the day the controls below must be in place. Our free tiers hub lists what stays free after upgrading.
How to check how much credit you have left
On Google Cloud, open your Cloud Billing account and look at the Billing Overview page. The Free credit pane shows your remaining credit and the days left, and promotional credits appear on the Credits page in the same console. On AWS, the Billing and Cost Management console home shows your credit balance and free plan status. On Azure, the subscription overview shows the remaining credit and the spending limit banner. For API providers, OpenAI shows the prepaid balance on its billing page and Anthropic shows spend against your monthly cap on the Console billing page.
What a budget actually does on each console
- Google Cloud: Cloud Billing budgets default to alerts at 50%, 90% and 100% of the amount, emailed to billing admins. Google says plainly that an alerts-only budget doesn’t cap usage or spending. You can also connect a Pub/Sub topic, which receives notifications multiple times a day and is the hook for automation.
- AWS: AWS Budgets tracks actual and forecasted cost, sends email or SNS notifications, and is updated up to three times a day with 8 to 12 hours between updates. AWS warns that you may incur costs past your threshold before the notification arrives.
- Azure: Cost Management budgets alert at thresholds you choose, with cost data available within 8 to 24 hours and budgets evaluated every 24 hours. Microsoft states that resources aren’t affected and consumption isn’t stopped when a threshold is hit.
- OpenAI: spend alerts notify and let traffic continue; hard spend limits return a 429 error with
organization_spend_limit_exceeded. - Anthropic: the Console billing page lets you set a spend limit below your tier’s monthly cap, and requests return a 400 error once it’s reached until you raise it.
The common thread is that cloud budgets lag and only talk. API spend limits are near real time and actually stop requests.
Hard caps, where they exist and where they do not
A true hard cap means spending can’t exceed a number you choose. Here’s who offers one.
| Provider | Hard cap available | How it works |
|---|---|---|
| Google Cloud | No, for most services | Alerts-only budgets; spend cap budgets exist only for some services; otherwise remove billing yourself |
| AWS | Partial | Budget actions can apply an IAM deny policy or SCP, or stop named EC2 and RDS instances, automatically or after approval |
| Azure | Yes, on free and credit subscriptions only | Spending limit equals the credit and cannot be customized; pay-as-you-go has no spending limit |
| OpenAI | Yes | Monthly hard spend limit per organization or project; enforcement is not instantaneous |
| Anthropic | Yes | Tier spend cap of $500, $1,000 or $200,000 per month plus your own lower limit |
| OpenRouter, xAI | Yes, by design | Prepaid credits; requests fail at zero balance |
Azure’s spending limit is the strictest on the cloud side, but it disappears when you convert to pay-as-you-go, custom amounts aren’t available, and some Marketplace services bill outside it. AWS budget actions are the most flexible, since you can deny new provisioning at 90% of forecast and stop specific instances at the same time. Google offers no account-wide cap, which is why the kill switch section below exists.
Prepaid vs postpaid, and why it matters
Prepaid platforms can’t send you a bill you didn’t fund. OpenRouter credits are prepaid, with purchases between $5 and $25,000. OpenAI runs on prepaid credits too, with a credit_balance_exhausted error when they run out, though any auto-recharge you enable on the billing page will refill the balance for as long as the card works. DigitalOcean is the one small-cloud exception: the card is charged once the $5 credit is used or expires.
Postpaid platforms, meaning Google Cloud, AWS and Azure pay-as-you-go, bill at the end of the period for whatever ran, and Anthropic is postpaid within a monthly cap. For an unattended project, we’d pick a prepaid platform or stay on a trial account every time.
How to build a kill switch for Google Cloud
Google documents the kill switch itself, in a guide on disabling billing with notifications. You connect a budget to a Pub/Sub topic, deploy a Cloud Run function that subscribes to it, and have the function remove the billing account from the project when spend crosses the budget. The function needs billing admin permission on the billing account, and the Python sample ships with a simulation flag that logs instead of acting until you’re ready.
Read the warnings first. Removing billing terminates every service in the project, including free tier services, and Google warns that resources might be irretrievably deleted and recovery isn’t guaranteed. Notifications also arrive after costs are incurred, so set the budget below the amount you can afford to lose. On AWS, the equivalent is a budget action that applies a deny policy; on Azure, a budget can call an action group, which can trigger automation such as an Azure Function or a webhook that deallocates VMs.
The five traps that cause most surprise bills
Most horror stories come from one of these, not from the compute you meant to run.
- NAT gateways. On AWS a NAT gateway in US East (Ohio) costs $0.045 per hour plus $0.045 per GB processed, which is roughly $33 a month before any traffic. Public IPv4 addresses cost another $0.005 per hour each, idle or not.
- Egress. Data leaving the cloud is billed per GB on every provider, and the always-free allowances are small: Google’s free tier covers 1 GB of North American egress from Compute Engine and 100 GB from Cloud Storage per month. A public bucket serving video can blow through that in a day.
- Idle GPUs. A GPU VM bills every hour it exists, not every hour it trains. Trial accounts on Google Cloud can’t attach GPUs at all, so the first GPU you launch is the first one on your card. Delete it the moment the job ends.
- Leaked API keys. A key pushed to a public repository is used within minutes. OpenAI’s project spend limits and Anthropic’s workspace limits exist so a single leaked key can’t drain the account, and the organization key never belongs in client code.
- Forgotten managed services. Databases, load balancers and Kubernetes clusters keep billing after the app that used them is gone. Terminate the RDS database from the AWS $20 activity right after you earn the credit.
A checklist for the day your credits expire
- Write down the expiry date from the console the day you sign up: 90 days on Google Cloud, six months on the AWS free plan, 30 days on Azure.
- Set a budget at 50% and 90% of the credit, and a second budget at a small dollar amount for after the credit, since credits can mask real spend.
- Decide in advance whether you’ll upgrade. If not, export your data before the window closes; Google gives 30 days of grace and AWS gives 90.
- Delete anything with an hourly rate: NAT gateways, GPUs, load balancers, static IPs, idle databases.
- For API keys, set a hard spend limit at the organization and a smaller one per project or workspace.
Our pages for Google Cloud, AWS, Azure, OpenAI and Anthropic note the current expiry rules, and the Google Cloud review covers its billing console in depth.
The short version
- Cloud budgets on Google Cloud, AWS and Azure alert but don’t stop spending, and they lag by hours to a day.
- Trial accounts can’t bill you until you upgrade; Google closes the trial account, AWS closes the free plan, Azure disables services.
- Hard caps exist at OpenAI, Anthropic, Azure free accounts and every prepaid API; Google Cloud needs a self-built kill switch.
- NAT gateways, egress, idle GPUs, leaked keys and forgotten databases cause most surprise bills.
- Set one key per app with its own spend limit, and delete hourly-billed resources before the credit window ends.
FAQ
Does google cloud charge automatically after free trial
No. Billing begins only if you manually upgrade to a paid billing account. Without an upgrade the trial billing account closes when the $300 credit is spent or 90 days pass, and your resources stop.
Will google cloud charge me if i upgrade during the trial
Only for usage beyond your remaining credit, the Free Tier limits, or products the trial doesn’t cover. The unused credit stays available until 90 days from signup, and normal pay-as-you-go billing applies after that.
How to check google cloud credits
Open the Cloud Billing account in the Google Cloud console and go to the Billing Overview page, where the Free credit pane shows the remaining amount and days. Promotional credits and their expiry appear on the Credits page under the same billing account.
Can i set a hard spending limit on google cloud
Not account-wide. Alerts-only budgets don’t cap spending, and spend cap budgets exist only for certain services. To stop all spending you connect a budget to Pub/Sub and deploy a Cloud Run function that removes the project’s billing account, which shuts down every service in the project.
Does aws budget stop services when exceeded
Only if you configure a budget action. AWS Budgets can apply an IAM deny policy or a service control policy, or stop specific EC2 and RDS instances, either automatically or after your approval. A plain budget with notifications only sends an alert.