How I Avoid Bill Surprises in AWS

Filipe Pacheco
5 min readJun 24, 2024

--

A guide to avoid getting discouraged at the beginning of your journey

Hello Medium readers,

I’m back again with a new post related to AWS. After analyzing the data on reactions, engagement, views, and reads, two topics have particularly grabbed my readers’ attention. First, Large Language Models (LLMs), especially the post LLM-Hands-On: Implementing a Vector Library in Python (RAG), and second, I Need to Discuss AWS Cloud Quest with You.

These two posts have been my best-performing content on Medium so far. Based on this, I’ve decided to create a new post related to what my readers enjoy. Thus, I present to you this post: “How I Have Avoided High Expenses in AWS by Making Small Adjustments,” which aims to help you avoid the unpleasant surprise of a HUGE AWS bill at the beginning of the next month.

I only believe what I see

As I mentioned in my last post about tips for Data & Analytics project management,5 Tips before start your Data & Analytics Projects, I’m not the kind of person who shares experiences I haven’t personally encountered. Because of this, I’ll begin this post by sharing my AWS Billing and Cost Management view to prove my point.

My own AWS Cost Explorer view.

As you may know from following my journey on this blog, last year I started to question whether I would eventually become an outdated Data Scientist. This questioning led me to write my first post, Can 3 years make a Data Scientist outdated? | by Filipe Pacheco | Medium on Medium. One outcome of this introspection was the urge to learn about Cloud computing, especially AWS, the cloud service provider used at my company, and how to deploy AI/ML projects in AWS.

At that point, I created my AWS account to test what I was learning in the courses I was taking. As you can see, in the first month, September 2023, my main cost was related to SageMaker, which I used to train ML models. In the next month, I barely used my AWS account because I was busy with my first training session in the Cloud Bootcamp, learning some soft skills before returning to AWS to prepare for the AWS Cloud Foundational Certification.

To complete this task, I signed up for AWS Skill Builder, which costs $29 per month, plus $4 in taxes. I explained in a previous post why I have this subscription. As you can see, since November, my spending has been almost constant, with the only exception being in February when I needed to use Route 53 and EKS to deploy a specific application. I described this in the post, From EKS to Route53, Exploring the Deployment Process of HumanGov application. | by Filipe Pacheco | DevOps.dev (medium.com)

These two services are not included in the Free Tier, so in February, I spent $40. It could have been more if I hadn’t set up some warnings on my account. Now, let’s jump into my setups so you can avoid unpleasant surprises.

What you need to do!

In the AWS Console, search for “Billing and Cost Management”, and you will see an image similar with the image below. In the left part, I highlighted in yellow where you should click, Budget.

AWS Billing and Cost Management view.

On the Budget Overview page, you will find all the budgets you have set up. I currently have just one, and as you can see, it has been exceeded. Let me explain why. I have two budget triggers: the first one is for every spend above $1, which I receive every second day of the month when my AWS Skill Builder subscription is renewed.

The second trigger is set at $35. I’m developing an ML project that I plan to deploy in the coming months and will share here as well. To avoid surprises, I have this second trigger, and as you can see, I don’t spend more than $35 per month.

AWS Budget Overview.

To create your own budget, click the orange button in the top right of the screen labeled “Create budget.” You don’t need to have deep knowledge of AWS to set this up. AWS provides a ready-made template to make it easier for you. Simply create a name for your budget and enter your email address in the “Emails recipients” field to receive notifications.

You can also select a customized version, but even with the simplified, pre-selected options, you may choose among the “Zero spend budget,” which I highly recommend if you are just starting with AWS, or you can set up a monthly spending budget. Once you’ve made your decision, click “Create budget.”

Choose budget type view.

If you want to customize even more your metric, once you created you will be in the AWS Budget Overview again, click in your recently created budget and you will see this. Click in the button “Edit” on the top right of the screen.

Your budget detail view.

On this new page, you will be able to add or edit customizations to make your budget more suitable for your needs. You can change the trigger to be based on forecasted spending instead of actual spending. You can also set the trigger to be a percentage of a specific value.

Additionally, you can create more than one alert, as I have done, which I recommend. You can also add an SNS Topic for specific communication services. I have a guide on how to configure an SNS Topic in my post, AWS: Implementation of EC2 instances using Terraform and AWS Systems Manager.

Conclusion

I hope you liked my tips on managing AWS expenses to avoid high bills. In summary, I recommend you to create multiple alerts and customizing your budget settings to match your needs, referencing a related post for further customization.

If you liked, follow me to next posts ;)

--

--

Filipe Pacheco

Senior Data Scientist | AI, ML & LLM Developer | MLOps | Databricks & AWS Practitioner