Making Automatic Adjustments to Your AWS Budget
Use a public cloud for long enough and you are sure to run into a situation in which your monthly bill ends up being higher than expected. I have occasionally heard horror stories about unsuspecting admins who racked up thousands of dollars in unexpected charges because they didn't understand the full impact of what it was that they were doing in the cloud.
One of the best ways to protect yourself from sticker shock in the AWS cloud has always been to create a budget. By creating a budget you have the ability to tell AWS how much you are comfortable spending within a billing cycle. Amazon even gives you tools for tracking your spending in relation to your budget. In my case for example, I receive an email report every Sunday night showing my spending so far for the month, how much of my budget I have used, and a forecast of what my spending is expected to be for the rest of the month based on the resources that I have used thus far.
For the most part, AWS budgets work really well. The previously mentioned budget report has saved me from excessive charges on more than one occasion. Historically however, there has always been one shortcoming associated with using AWS budgets.
Imagine for a moment that you start a new online business that is hosted in the Amazon cloud. As with any new business, it is important to control costs so you set up a budget to help you keep tabs on your cloud spending. So far, so good. Now suppose that after a few months your new business becomes wildly successful and all of the new business that you are doing causes your cloud usage to increase. Your original budget is likely to be inadequate to handle the costs associated with the increased cloud use. That being the case, you will have to modify your budget.
In this example, the budget modification probably isn't that big a deal. But imagine what would happen if instead of becoming an overnight success the business grew slowly, but steadily over time. You would probably find yourself changing the budget over and over again to allow for increased cloud resource use in response to the organization's growth.
Thankfully, Amazon has just introduced a new automatic budget feature. That way, budgets can be adjusted automatically based on your recent use trends. Let's take a look at how this works.
To get started, choose the AWS Budgets option from the list of services (it's in the AWS Cost Management section). When the Budgets screen appears, click the Create Budget button. This will take you to a screen like the one shown in Figure 1 asking you to choose the type of budget that you want to create.
Choose the Cost Budget option and click Next. This will cause AWS to display the Set Your Budget screen. The first thing that you will have to do on this screen is to provide a name for the budget. Once you have done that, choose your desired budget period (the default is a monthly budget) and when you want the budget to start. Next, choose whether you want the budget to be recurring or expiring. Finally, set the Budgeting Method to Auto Adjusting, as shown in Figure 2.
When you choose the Auto Adjusting option, you will have to choose a time range. If for example, you were to set the time range to six months then your budget would be based on your average spending over the last six months.
Click Next and you will be taken to the Configure Alerts screen. This is where you can define alert thresholds related to your budget. You can create up to five separate alerts and those alerts can be based on absolute dollars or on a percentage of the budget. Additionally, alert triggers can be based on the actual costs that have accrued or on forecasted spending. For example, you might choose to create an alert if your forecasted spending is 90 percent of your budget.
Creating threshold alerts is optional, but tends to be helpful with regard to monitoring spending. However, threshold alerts are not the only type of alert that AWS generates. The very nature of auto adjusting budgets means that budgets will fluctuate based on usage patterns. AWS will automatically send you an alert when your budget changes. You don't have to do anything to set up these types of alerts.
When you finish setting up any threshold alerts that you want to create, click Next and you will be taken to the Attach Actions screen. Attach Actions give you the ability to trigger certain cost saving actions when an alert threshold is reached. For example, you might automatically power down an EC2 instance to save money. Again though, such actions are optional.
Click Next and you will be taken to a screen where you can review your budget. Assuming that everything looks good, click the Create Budget button to complete the process.
Brien Posey is a 21-time Microsoft MVP with decades of IT experience. As a freelance writer, Posey has written thousands of articles and contributed to several dozen books on a wide variety of IT topics. Prior to going freelance, Posey was a CIO for a national chain of hospitals and health care facilities. He has also served as a network administrator for some of the country's largest insurance companies and for the Department of Defense at Fort Knox. In addition to his continued work in IT, Posey has spent the last several years actively training as a commercial scientist-astronaut candidate in preparation to fly on a mission to study polar mesospheric clouds from space. You can follow his spaceflight training on his Web site.