CloudSLAW Correction: Billing Alerts

I made an oopsie. Here's how to quickly fix it.

Hi everyone,

Well, it was bound to happen sooner or later and… it was sooner. I made a technical error in a lab. This post explains what I got wrong, why I made the mistake (it wasn’t pure stupidity, this time) and has instructions on how to fix it.

The problem doesn’t affect all of you and the fix only takes a few minutes.

Who is affected

If you completed Follow the Money (the billing alert lab) before February 7th, 2024 follow the steps in the “If I already have a billing alert” section below.

If you completed Timmy’s First CloudFormation but NOT Follow the Money on or before February 7th, 2024 follow the steps in the “If I have the SNS topic but not the billing alert” section.

If you have not completed either of those labs then don’t worry — all the instructions are updated and you won’t hit this problem.

What happened and why

Tl;dr I had you create something in the wrong region.

In Follow the Money! we created a billing alert in the us-west-2 Oregon region. That is my preferred region for all labs. We selected billing metrics that are generated in the us-east-1 Virginia region using a dropdown in the CloudWatch Metrics user interface.

I knew all billing actually occurs in us-east-1 and historically that is where i’ve built this alert previously, but I saw that dropdown as an option and outsmarted myself. AWS allowed me to build the alert, but if you look you can see it has "insufficient data”.

The alert doesn’t error, but it won’t generate any actual alerts.

Since we also created our SNS topic in us-west-2, you can’t send your billing alerts from us-east-1 until we create another SNS topic there. While we can use SNS cross-region, it requires working at a depth beyond where we are right now.

I knew better. I got lazy and fancy. Bad combo if you aren’t a cat.

If you have the SNS topic but not the billing alert

The fix is easy.

Go back to Timmy’s First CloudFormation and repeat the steps in the us-east-1 region. This will create your SNS topic in us-east-1 (Virginia), in addition to the one you already created in Oregon. Then you can complete Follow the Money! as written since I updated it to keep you in Virginia.

If you already have the billing alert

Instead of making you do everything again I created a CloudFormation template that will do it all for you in less than 5 minutes. This one even has you put your email in as a parameter so you don’t have to manually subscribe.

Step by Step

Log into https://console.aws.amazon.com. Then go to CloudFormation. Click Create stack.

On the next page, point to the template I have waiting for you at https://cloudslaw.s3-us-west-2.amazonaws.com/billing-alert.template 

Click Next and then name the template and provide the email where you want to receive alerts. This is a feature of CloudFormation we haven’t used yet. It will use that form field when it creates the subscription. You still need to check your email to verify the subscription after it deploys.

Then just click through the next couple pages of settings, and Submit.

You will get an email within a couple minutes, just like when you created your first subscription in the original Show Me the Money! Click that link and you’ll be all finished.

Again, I’m sorry for this, but on the upside you now have a fancy CloudFormation Template you can use in other environments to knock out a quick billing alert.

Please email me with any questions or problems at [email protected]. I’ll try and limit myself to… less obvious… mistakes in the future!

-rich

Reply

or to participate.