Heart Failure in the Cloud

Jevon Davis
4 min readJan 31, 2022

--

At some point in our cloud development life, we have had some level of heart failure when we are slapped with a surprise bill that we never budgeted for. Whether we are just starting out or we are well-established veterans, we have all been there. Today we’ll take a look at setting up alerts for the big two in the cloud space, Azure and Amazon Web Services(AWS). Hopefully, this will help in sustaining the health of our upcoming or existing cloud professionals.

AWS Billing Alerts

In AWS before we can even create a billing alert, we first have to enable the feature:

  1. We do this by going to the Billing and Cost Management Console.
  2. Click on “Billing Preferences:
Billing & Cost Management Dashboard

3. Tick the “Receive Billing Alerts:”

Enabling Billing Alerts

Click on “Save Preferences.”

Now let’s create our billing alerts or in this case, using AWS terminology, our billing alarm.

  1. Let’s Navigate to the CloudWatch console If your region is not on US East (N. Virginia) by default then change it to it. This is because billing metric data is stored in this Region and represents worldwide charges:
Region change for billing metric

2. Click on All alarms:

CloudWatch Alarms

Once you get to the next screen and navigate to Create alarm>Select Metric then we navigate to Billing>Total Estimated Charge. Now we select USD as our estimated charges and confirm by clicking “select metric:”

Billing Dashboard

We are now presented with a list of our conditions. Let’s go ahead and leave everything as default and input our threshold value:

Conditions Configurations

Let’s configure our Alarm:

Actions Configuration

We have to create a new topic above as we do not have an existing SNS topic. Essentially this is telling us there are no existing topics that contain an email endpoint to send the alerts to. Once you have created that and confirmed, we will now confirm our alarm and see it below:

Created Alarm

NB. Insufficient Data indicates there isn’t enough activity that has taken place for the Alarm to be triggered.

Confirmation in our e-mail:

Confirmation E-mail

Azure Cost Alerts

Go to your Azure Portal and navigate to Cost Management. Navigate to the left blade and click on “Cost alerts.” As you can see we have no alerts at the moment:

Azure Cost Management Dashboard

Let’s go ahead and fix that. Click on Add and once presented with the new page we will go ahead and put in sample data for our alert:

Budget Creation

NB. Reset Period is simply saying once the new month starts, the value will be at zero, and then recalculations will restart.

Let’s move to our final screen:

Alert Configuration

Let’s briefly touch on the highlighted section:

Forecasted: gives a predictive alert on where your spending trends will exceed your allocated budget.

Actual: gives you the alert when your budget is exceeded in real-time.

Let’s click “Create” and wallah! That’s it! You’ve set up your Azure Cost Alert. I think we can agree it’s way fewer steps than AWS alerts.

Conclusion

Having cost alerts set up in our cloud environments are extremely important. There are times when we get caught up in deploying various services and we either forget to delete, disable or clean up our environments. The cloud is not a forgiving place. An unused SQL Server in Azure that we forgot to delete after we had finished testing it for an app integration can run you up to $400USD a month and similar AWS artifacts can run you about the same or more. Cost alerts are often overlooked by newcomers to the cloud space but they should never be ignored.

--

--

Jevon Davis
Jevon Davis

Written by Jevon Davis

I am a cybersecurity professional who is passionate about everything Cloud. I help teams deliver a secure Cloud Experience to their customers.

No responses yet