In cloud where we get charged based on the usage, it is easy as said for our costs to spiral out of control. Even before we can blink, thousands of dollars could be siphoned out of our accounts.
This is a downside, but this is the new world of modular charging where we pay what we use. Imagine a website being highlighted in the Oprah show, and suddenly half the world starts hitting the website. The bandwidth will go well over your set limit and will hit the roof in seconds and then the dollars start to slip out of your pocket.
To prevent it, in AWS, there is a provision to set a budget and as soon as you hit the budget limit, you get notified. While this is reactive and does not automatically shut off your servers, it still is a line of defense that could come handy.
Setting Budget in AWS
Head to your AWS console: https://us-east-2.console.aws.amazon.com/console/
Click on your account and then My Billing Dashboard.
In the sidebar, click on Budgets.
Create a new budget by clicking on Create budget.
You can create a budget based on costs or usage. For this tutorial perspective, I am going to consider a budget based on costs.
Give a name for your budget. I call this tutorial. I have setup a monthly recurring budget of $10. I can select different variants based on the options available.
Click on Configure Alerts.
I configured an alert when my actual costs hit 80% of my specified budget. And I provide an email address where the notifications are sent to. Hit Confirm budget.
On the final screen, click on Create to create your budget alerts.
It automatically takes you to your budget dashboard.