How do I ensure my AWS free tier plan doesn't exceed the free usage limit?

I'm spinning up a free tier instance and I don't want to accidentally exceed the limit. How do I do that?


You can't set a limit on AWS spending. AWS doesn't have a limit function - it's not in their interest, even though they do quite well at putting the customers first and trying to help the customer save money.

Billing Alarms

You can set up multiple billing alarms, which will warn you when the estimated monthly bill reaches the thresholds you set. You set these up in CloudWatch, in the N. Virginia region. In CloudWatch, click billing, create alarm, select "total estimated charge", then set up the screen something like this.

CloudWatch billing alert

Budgets

Budgets are another way to manage costs. They're a lot more flexible than billing alarms, a lot more granular. You can set them up by service, or by metric.

Cost Explorer

The cost explorer is an interesting too. It won't alert you, but you can see what you spend your money on.

You can use it to see charts that show what you're spending money on. For example this chart shows this account spends most of the money on EC2, but some on glacier, S3, and other bits and pieces. The chart underneath tells you exactly what the cost is.

AWS Cost Explorer

Free Tier

The free tier gives you enough credit to run a single EC2 t2.micro instance for a year, with sufficient disk, snapshot storage, etc, to be useful. You get a heap of other things free, like Lambda, RDS, EBS, EFS, a very generous allocation (unlike Azure - which gives you a month trial). Many people will end up paying a little bit for things like snapshots, bandwidth, etc, but that seems fair given how much you do get.

What I Do

I find it best to create multiple billing alarms, say at $5, $10, $20, $50, and $100. That should cover you. If you get multiple notifications at one time get in there quickly and work out what's going on. I also use budgets

CloudTrail

CloudTrail is a good service to monitor API calls in your account, so you know who creates what resources, and when. It can be tricky to work out exactly what it's saying because it's all JSON, but if something goes wrong at least you have all the information to work out what happened. I assume there are commercial services that make these logs easier to understand.

Per Second Billing

As @avinashbot points out below, as of 2nd October 2017, all billing for most Linux instances is by the second instead of by the hour. That makes trying things out significantly cheaper.