I'm writing this article to hopefully save someone else going through the pain I did earlier in the year when I received an email from AWS stating that my bill for that March was $14,890 ๐ฑ
I have only dabbled with AWS a small amount and was only utilising AWS S3 buckets to store images for my full stack e-commerce project with the Code Institute at that point.
I naively thought that my account would be fine as I was on the free tier, and hadn't reached anywhere near the thresholds - I'd forgotten that nothing online is safe, and that you always need to make sure EVERYTHING is kept as secure as possible, especially anything connected to your billing information!
I'd fallen victim to someone who'd somehow managed to gain access to my account and was using it to stream massive amounts of video data, hence the pretty hefty bill. So lets learn how you can protect yourself from this happening to you by adding some budget alerts to your AWS account. ๐จ
Add a Zero Spend Budget
Log into your AWS account as the root user.
Note: If you don't have MFA set up on your account, take a quick detour and get that set up now - it's another step that can really help keep your account as secure as possible.
In the top right hand corner click on your account name and then select Billing and Cost Management from the dropdown menu.
- From the left hand menu, select budgets and then click the create budget button.
- For this article we will be using a template to set up our budget alert, so select use a template, and then choose the Zero spend budget template. This budget which will notify you once your spending exceeds $0.01 for any AWS service (so anything over the free tier). Customise the budget name, add an email address to be notified on and then click the create budget button.
- On the budget page you can now select the budget you just created and can view the alert by selecting the Alerts tab. You also have the option to add additional alerts - for example if you wanted to add a an alert for when you reach 75% of your budgeted amount (in this example that would be once our actual cost reaches $0.75). To add additional alerts click the edit alerts button.
- On this page you can make further adjustments to the original alert - such as the threshold amount or notification preferences -and add further alerts. To add your second alert, scroll to the bottom of the page and select the Add alert threshold button.
- Enter the new alert threshold and click the next button - confirm your alert parameters are correct and click the next button again.
- The review page gives you an overview of the details and alerts set up for your budget. Once you have confirmed these details you can select save and this will add the additional alert to your budget. You will then be taken back to the budget overview page where you can once again click into your budget and the alerts tab to see your new alert.
You can now explore all that AWS has to offer, safe in the knowledge that you have budget alerts set up to let you know if you go over any free tier allowances ๐
Other Budgets
As you saw in an earlier step, there are a number of templates you can use to customise to your budget which may be better suited to your purposes - for example you are exceeding the free tier, the free tier period has expired or are paying to use AWS services in a professional capacity you may prefer to use the monthly cost budget template to set a monthly budget amount.
I'd love to know if you found this article helpful, and what you're currently using AWS for - leave your comments below โฌ๏ธ