How-To

Eliminating Unnecessary AWS Costs

Figuring he's not alone in facing continuing mystery charges, Brien details some hidden AWS costs that you might be able to eliminate.

Cloud providers such as Amazon have long promoted themselves as the inexpensive alternative to operating on-premises because you only pay for the resources that you use. At least in theory this means that if you don't have any cloud use in a particular month then your costs should be zero.

In the real world however, I have found that this is rarely the case. I use AWS purely for lab purposes and am diligent about cleaning up after myself at the conclusion of a project. Even so, there are charges that show up on my bill month after month. These charges aren't huge. They only amount to a few cents each month. Even so, I seriously doubt that I am the only one who is having these issues. As such, I wanted to take the opportunity to talk about some hidden AWS costs that you may be able to eliminate.

The Cost Explorer
If your goal is to track down the source of mystery charges, then the easiest way to get started is to open the Cost Explorer. By default, the chart that appears when you open the Cost Explorer will show you the services that have resulted in the greatest costs over the last six months. However, you can change the chart's range so that only the current month's charges appear. This will give you a much better feel for which services are incurring costs.

It is worth noting that there are a set of filters that appear to the right of the chart. It's a good idea to make sure that the Region filter is set to Include All. Otherwise, you might have costs from resources in another region that are not showing up on the report.

Figure 1: The Cost Explorer can help you to figure out where charges are coming from.
[Click on image for larger view.] Figure 1: The Cost Explorer can help you to figure out where charges are coming from.

A Few Things to Check
If your goal is to optimize your AWS spending and you have thus far gotten rid of any unnecessary AWS resources, there may still be a few things that you can clean up in an effort to further reduce your costs. The sections below describe a few commonly overlooked items that may exist in your AWS environment.

Budgets
Amazon allows you to create budgets as a way of keeping your spending in check. If for example, you want to make sure that you do not spend any more than a particular amount in a given month, then a budget can help keep you from accidentally exceeding that threshold.

Somewhat ironically, Amazon charges a fee for each budget that you create. The fee (based on my own experience) is only about four cents per month, and so the cost is likely worth the peace of mind that having a budget can bring. Still, budgets can be an unexpected source of costs.

Configuration Recordings
Amazon offers a tool called AWS Config that when enabled, continuously monitors your AWS environment and records any changes. If for example, you were to create or delete resources or change the way that a resource is configured, those changes would be recorded by AWS config.

AWS Config can be a handy tool for organizations that have compliance requirements or who need to maintain tight control over their resource configurations. At the same time though, not every organization uses AWS Config and it is one of those things that is easy to enable accidentally.

If you find that charges are stemming from AWS Config, you can disable it by opening the AWS Config dashboard and clicking on Settings. Make sure that the Recorder section indicates that Recording is Off, as shown in Figure 2. Otherwise, a checkbox will be displayed and you can clear the checkbox to disable recording. Incidentally, you will need to check each region separately

Figure 2: Make sure that recording is off.
[Click on image for larger view.] Figure 2: Make sure that recording is off.

Abandoned Buckets
One of the most common sources of wasted AWS spending is abandoned S3 buckets. There are many AWS services that when enabled, will create and use S3 buckets. Sometimes a bucket will remain even if you terminate the service that was responsible for its creation. If you look back at the figure above for example, you can see that even though AWS Config is no longer recording, it was configured to use an S3 bucket.

If you are trying to bring down your AWS spending, it is almost always worth taking the time to see if there are any abandoned S3 buckets that you can delete.

About the Author

Brien Posey is a 22-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.

Featured

Subscribe on YouTube