Monitoring Cloud Computing Costs

August 9, 2020

Monitoring Cloud Computing Costs

Here is my current cloud cost monitoring stack across the providers I use in some capacity

As of early August, we all know the state of the world over the past few months. Many have started new hobbies (I know for me; I’ve really gotten into Formula One) or have expanded their existing hobbies. While gaming is always one of my main hobbies, so too has been cloud computing. It’s a wonderful cycle of I get exposed to new technologies in work, I might then at the weekend actually try to learn more about the technology. Or, I discover something new on my own and then bring that knowledge in to work to see if we can leverage it. But with many hobbies, it’s important to track how much you spend on it and that’s especially true with cloud. You never want to accidentally leave something running or misconfigure something, only to end up with a massive cloud bill and you spend your weekend pleading with support to get the bill reduced or waived. Herein is some of the tools I have to keep a tab on things when it comes to my spend.

So, most cloud providers have some form of basic cost monitoring. For providers I generally do not daily drive but have accounts with, this works just fine. Google Cloud Platform let you configure a budget with a notification topic so you can get notified when you’ve spent X% of that budget. DigitalOcean will email you once your costs accrued reach a certain threshold. It works for me since if these cost alarms trip and I know I’m not using them for anything, something is definitely wrong. Or if I am using them for something experimental, then I know I should probably turn something off.

Amazon Web Services (AWS) is my default primary cloud provider for all my personal workloads and I have several tools at my disposal here. The first is the always recommended, CloudWatch billing alarm. I think when you use AWS for the first time, this is the first thing you should create. Step away from the EC2 Console and go the docs for the CloudWatch billing alarm. It’s relatively simple, should take no more than 10-20 minutes and will save your skin down the line. This process is also like putting your toe in the water for CloudWatch, a decent monitoring solution and Simple Notification Service (SNS) which is one of my favourite services for notifications either by email or even SNS. I won’t explain the logistics of creating this monitoring alarm, but the basic idea is that you can configure this alarm to send an alert to you when your costs have either breached a threshold or are estimated to breach a threshold. I tend to go with the estimate because I’d rather know sooner if my costs are spiralling rather than when they have spiralled, and I can’t do anything about it.

You can also configure Budgets in AWS and get a similar notification system to the CloudWatch alarm, but much more granular if you decide to. I need to do a lot more with budgets, but as an example I configured a monthly budget of 10 USD for GuardDuty when I initially started using the service. It’s a neat enough tool but is a family of AWS products that the monthly cost is a bit harder to predict in my opinion. So, I think it’s not a bad shout to configure Budgets on these kinds of services. Note that you get I think its two free Budgets per month, then it’s a tiny, additional charge per extra budget you set up.

Finally, something I’ve written about before but is one of the other tools in my cost monitoring tool belt is my Lambda based cost monitoring API. Cost Management has its own set of APIs that you can query to get your billing data. So rather than logging in to the AWS Billing Console every day to view charges to date, I just configured a Lambda to do those calls for me, then put the data in an email that gets sent to me via SNS. Neat solution that I’m actually very proud of, you should check out my blog for that post where I detail things a bit more.

That’s pretty much it so far when it comes to monitoring my cloud costs! Honestly if you’re setting out on your cloud journey for the first time, learning how to monitor costs should be the very first thing you do. Monitoring and learning how to reduce costs is a skill that will not only benefit your personal wallet but could also benefit your company’s wallet if you end up working in cloud.

Thank you!

You could of consumed content on any website, but you went ahead and consumed my content, so I'm very grateful! If you liked this, then you might like this other piece of content I worked on.

Learn more about one specific component in this stack

Photographer

I've no real claim to fame when it comes to good photos, so it's why the header photo for this post was shot by Michael Longmire . You can find some more photos from them on Unsplash. Unsplash is a great place to source photos for your website, presentation and more! But it wouldn't be anything without the photographers who put in the work.

Find Them On Unsplash

Support what I do

I write for the love and passion I have for technology. Just reading and sharing my articles is more than enough. But if you want to offer more direct support, then you can support the running costs of my website by donating via Stripe. Only do so if you feel I have truly delivered value, but as I said, your readership is more than enough already. Thank you :)

Support My Work

GitHub Profile

Visit My GitHub

LinkedIn

Connect With Me

Support my content

Support What I Do!

My CV / Resume

Download Here

Email

contact at evanday dot dev

Client Agreement

Read Here