Getting Started - Cost Controls and Alerts

#Cost Controls and Notifications

This isn't the most technically exciting article, its essential to configure alerts during the initial setup to prevent any unwanted and unexpected costs.

#The Basics on Costs

Cloud providers charge based on usage by region, the number of cycles, data transferred, connection or volume stored and accessed. Each of these services charge different rates based on the service, a Linux EC2 instance can be charged at $0.0049 per hour, whereas  the hourly cost for a blockchain instance is $0.134. 

 

The benefits, no massive up front costs for infrastructure and services. Deploying AWS services takes mere moments and deployable world wide. 

The downside, smalls costs add up to large bills. To ensure the Free Tier stays free, the following instructions implement budgets and alerts.

 

But first a couple of horror stories found with Google, not Bing, its still rubbish in the UK.

#Cautionary Tails

How I Got Pwned by My Cloud Costs

Story of my accidental £1.7k bill from Google Cloud

The AWS bill heard around the world

How a free trial experiment ended with a $72,000 bill overnight

#Further Reading

How AWS pricing works (here).

Save up to 90% with spot EC2 instances (here).

Control Free-Tier Costs (here)

#Billing Preferences

Logon as the Root user, browse to the top right corner and click on the Account Name, mines Tenaka AWS.

Select 'Billing Dashboard'

At the bottom of the left side select 'Billing Preferences'.

Enable each of the 'Receive...' checkboxes and add your email address, 'Save Preferences for email alerts.

#Budgets

Lets set a budget for estimated cost going forward, if its breached an alert will be sent.

Select 'Budgets'

 

Click on 'Enable Cost Explorer'. 

 

As its unexpected costs and bills ensure 'Cost Budget - Recommended' is selected and click 'Next'

 

Enter a budge name.....

 

I wish to limit any potential projected costs select Monthly, Recurring Budget, Fixed. 

With all the economic uncertainties my budget is a massive $5.

 

Go with the 'All AWS Services (Recommended)'.

Select 'Unblended Costs', a description of each type of cost is (here).

 

Click 'Next'.

 

Select 'Add an Alert Threshold', click 'Next'.

 

The alert set will trigger at 50% of budgeted $5, that's $2.50.

Add your email and continue.

 

Review and continue.

 

Select 'Create Budget'.

 

Before everyone gets critical regarding

 

#Cloudwatch and Billing Alarms

Budgets forecast likely spend over the month predicting likely cost. Cloudwatch provides a mechanism for setting an actual alarm based on current usage or cost.

Type 'cloudwatch' in the AWS search and select.

 

From Cloudwatch select 'Billing', then 'Create Alarm'.

 

Provide 'Metric Name' of Alarm_Usage_5.

Set the period of 6 hours.

Scroll further down.

Set 'Static' Threshold type.

Set 'Greater' or 'Greater/Equal' and set $5 uSD.

Select 'In Alarm'.

Select 'Create New Topic'.

Add description to 'Create a New Topic'.

Enter email address.

Then select 'Create Topic', then scroll to the bottom of the page and click 'Next'.

Add Alarm Name and Next.

 

Confirm the setting on the Preview page and click 'Create Alarm'.

Check your emails and click on the link provided to confirm subscription.

That's it, its now time to play knowing that your safe and any costs incurred an alert will be received.