One of the things that prevents a lot of people from exploring AWS is the cost. Some AWS services are very expensive. Accidentally forgetting to cut something off and getting charged is the worst feeling. Trust me, I know.
Is this an irrational fear? Is this something people think of just as an excuse for not getting started? Absolutely not. This is definitely, 1000% a valid fear. I'm sure most people involved with AWS have a horror story about getting charged unexpectedly. The great thing is that there are steps you can take to prevent this from happening. For the first installation of Learn AWS With Me, I'm going to cover 3 things you can do to make sure you don't get billed unexpectedly.
1. Cut Things Off IMMEDIATELY
This might seem really obvious but I mean it. Seriously. This is something you should get into the habit of doing early. If you're just practicing and you want to make sure you know how to navigate the AWS console, make sure to undo your work immediately!! Did you just spin up an EC2 instance? Great!! SHUT IT DOWN!! You just figured out how to use RDS? Amazing! Shut. It. DOWN!!!!!
Not all AWS services are expensive. AWS Lambda is one example. Leaving a practice lambda running won't cost you a whole lot. But this definitely isn't always the case. I mentioned EC2 and RDS earlier because I know from experience that those two can be VERY expensive. So, again, MAKE SURE TO SHUT THINGS DOWN ONCE YOU FINISH PRACTICING.
2. Set Up Billing Alerts
Did you know that you can set up billing alerts on AWS? I didn't learn this until it was too late (more on that later). Setting up a billing alert can save you sooo much pain, heartache, and most importantly, money. Follow these steps to set up billing alerts right now!
In the AWS management console, search for a service called CloudWatch
On the left hand corner of the CloudWatch dashboard, click Billing
For Step 1, we have to track a metric. We want this alarm to track EstimatedCharges as our metric. Set the currency to whatever fits your location.
At the bottom of the page, you can define your price limit. You can set the limit to 0 if you don't want to go past the free tier limits. After you've defined your price limit, click Next
For Step 2, define what kind of notification you want to receive. You should set this to In Alarm
You can SNS topic whatever you like. I chose, 'toomuchmoney'. Now set it to whatever email you want the notifications to be sent to. Click Create Topic.
Click Next on the bottom right-hand corner.
For Step 3, choose alarm name next. You can give this the same name as your topic if you like. You can also add a description for this alarm if you want to.
Step 4 is just previewing what you've already done. If everything looks good, you can finish things off by clicking Create alarm
Now you have an alarm that will tell you whenever you get close to passing your price threshold.
3. Open a Support Case
What if you're past the point of no return? What if you already got the email from AWS telling how much you'll be charged? Does it sound like this is something I'm remembering? Well, that's because this happened to me recently and I was devastated. Thankfully, there is something you can do to fix this.
You can open up a support case! How?
- Click on the Support button in the top right hand corner and choose Support Center. You can also search for support in the AWS Management Console.
- Click Create Case and click Account and billing support
- Fill out the details that best fits your situation.
It's important to keep in mind that you don't want to take advantage of this method too often. I've only had to submit a support case once and someone from the AWS support team got back to me within a few days and waived my bill. But I have heard that they aren't always so forgiving after the first time. So don't rely on this feature too much. It might not turn out well for you all the time.
Conclusion
AWS can be expensive. But I don't want that to stop you from learning how to use some of the services AWS has to offer. If you follow some of the advice outlined in this post, you can be sure that unexpected costs won't be something you have to struggle with. And if you slip up, you can always try option 3. Look out for the next Learn AWS With Me post coming soon! If you want to be notified when that drops, follow me here. And of course, if you have any requests, leave them in the comments below. Thanks for reading!
Top comments (17)
Great article! I definitely have a lot of horror stories š
For those who use Terraform I recently created a module to define budgets and receive the alerts via Slack channel, I will let the link here just in case any of you want to give it a try.
Terraform Registry: registry.terraform.io/modules/rrib...
Github: github.com/rribeiro1/terraform-aws...
Thanks for sharing!
Very good article and timely. This is exactly what we implemented last week after a development lambda running on a schedule went a little rogue writing out 1000s of failed axios error objects to CloudWatch every minute for days. Our CloudWatch bill went from around $8 to $8000. That bill was not a fun thing to wake up to.
You should also checkout and have a play with ACG playground (if you haven't already).
help.acloud.guru/hc/en-us/sections...
I'll be recommending it for most beginners going forward.
Would be cool if AWS offered such functionality...
Check out AWS budgets instead, easier, more info, I've setup a github with a CDK project and deploy stack button with CF template as a starter for those interested:
talkncloud.com/aws-essential-setti...
But, the big, unexpected bill is a right of passage! Love that this is your 2nd post on AWS.
Hopefully not anymoreš and thank you!
Agreed! And thank you!
Ceora, I think this topic is outdated. In CloudWatch, the billing button does not exist anymore, in the upper left section. I think they took it out.
But I managed to create this functionality using the Budgets feature of the Billing service.
Maybe the Budgets feature didn't exist back when you wrote this article?
This is a great overview. I also work on a product that helps notify you of costs along the way that removes a lot of the management overhead mentioned above. You should check it out - would love to hear what you think! vantage.sh/
Great post! AWS is too easy to leave on and incur an bill.
Thank you!
What's the thought behind using CloudWatch over creating a budget with a threshold?