DEV Community

Christopher Coffee
Christopher Coffee

Posted on

AWS Fundamentals: Create an Account, Billing Alarm, and Budgets

Table of Contents

  1. AWS Fundamentals: Create an Account, Billing Alarm, and Budgets

Introduction

I am creating a series of articles on my AWS learning journey. I will create a full-stack project to keep me interested in learning and use those skills to get certified. I also plan to do the same thing on Azure, and Google Cloud in the future.

In this first article, I will discuss setting up an AWS account, billing alarm, and AWS budget to ensure you never spend anything if you follow along. I also believe AWS gives you additional free credits beyond their free tier for the first year.

Create an AWS account

Let’s start by creating an AWS account. Click on the link below.
Cloud Computing Services - Amazon Web Services (AWS)

Currently, you will see an orange Create Account button at the top right of the page. Click this button to create an account.

Enable Billing Alerts

You can use AWS Cloudwatch to monitor your AWS usage and get alerts when you exceed your intended budget. You can use Billing Alarms and AWS Budgets to notify you once you have exceeded your budget.

First, you need to enable billing alerts in your billing preferences.

  1. Search for Billing or go to the AWS billing page. https://console.aws.amazon.com/billing/home?#/

Search for Billing

  1. On the left menu, under Preferences, choose Billing Preferences.

  1. Check Receive Billing Alerts **and Click **Save preferences.

Here is also the documentation for enabling this in case it changes.
Creating a billing alarm to monitor your estimated AWS charges

Create a Billing Alarm

Now let’s create an AWS Billing Alarm. We must do this under AWS Cloudwatch.

Search for Cloudwatch or go to https://console.aws.amazon.com/cloudwatch/ . You may also star the service when searching to make it a bookmark.

On the top right, directly left of your name, make sure the region is N. Virginia, because billing metric data is only stored in this region.

  1. Click All Alarms on the left-hand menu.

  1. Click Create Alarm

The button above only shows when you haven’t created any alarms.

There is also an orange Create alarm button that you will use when creating additional alarms. This button is at the top right of the screen.

Click Select Metric

Click Billing

Click Total Estimated Charge

Check the EstimatedCharges metric.

Click Select metric

From here, in Step 1, you can adjust the metric name and condition for the alert.

By default, the Threshold Type is Static, and the condition is Greater than. You should give a threshold value such as 0, so the alarm will trigger when you get billed anything over the free tier. Now click next.

In step 2, the Notification page, the default Alarm state trigger is In Alarm. We can keep this value. We must also select or create an SNS(Simple Notifications Service) topic that will receive the notification.

If you create a new SNS topic, give it a name and the email where you want the notification to be received. Now click create Create Topic and wait for it to be created.

Make sure to use a valid email because you will need to confirm the SNS subscription.

Click Next.

In step 3, give the alarm a name and description.

Click Next.

In step 4, preview your alarm settings and ensure they are correct.

Now click **Create alarm **at the bottom right. It will take a couple of minutes to finish.

I’ve linked the documentation below for reference.
Creating a billing alarm to monitor your estimated AWS charges

Creating an AWS Budget

Note: Currently, you get 2 budgets for free.

Search and go to **Billing **or go to the AWS billing page. https://console.aws.amazon.com/billing/home?#/

Under Cost Management click Budgets.

Click the orange Create Budget button.

  • By default, a template is selected. We can use this version for now. You have multiple template options, but we will keep the default, Zero spend budget.

Give the budget a name, amount, and email recipients.

Click Create budget.

Congratulations, you have created an AWS account and set up your AWS budget and Billing alarms.

In the following article, I will show you how to create an AWS IAM user and install the AWS CLI. We will use the AWS CLI to create an AWS Budget and Billing alarm.

Top comments (2)

Collapse
 
gicanpetresc profile image
Gican Petrescu

Thank you, I followed your tips and it worked nicely.

One question: Can you limit the budget spent? Like telling aws: "do not spend over this sum no matter what"

Collapse
 
cmcoffeedev profile image
Christopher Coffee • Edited

Hi, thanks, glad it was helpful. I don't believe so. You could use the AWS API to turn off services after a certain threshold. Maybe using a Lambda function. Also another option is using an Alarm State Trigger when creating a billing alarm. They include actions such as stopping, rebooting, and terminating an instance.