This is the second AWS blog as part of my 100DaysOfAWS challenge. Let's see how far I can reach.
If you're like me and you want to explore the world of AWS but are sceptical about not ending up with a gigantic bill then that blog post is for you.
Let's login with our root account and click on your username and then
my billing dashboard. Warning, this only works with the root account. If you have another account that is given same permissions as the root one it will not work.
Under preferences, select
billing preferences. In case you leave in a country other than the US you might want to be charged not in USD.
In that page you will see a few options on how to receive alerts. For now let's check the
receive free tier usage alerts as well as
receive billing alerts. Under the latter option, there is a link the
manage billing alerts which will lead us to CloudWatch to do a bit further setup let's click on that. This is where we can also change our billing currency. You can also search for the
CloudWatch service if you cannot see this option.
On the main CloudWatch page, on the left we can see a section for alarms. Let's click on the
billing option of it. Here we can create billing alarms to ensure that we're not going above our free tier limit. This tier gives us 10 free alarms and 1000 free email notifications each month. Now let's click on the
create alarm button.
Here there are some steps we need to go through. In the first one for metric and conditions, we can see that there is an option for currency. Let's change that to
GBP because we live in the UK. If we scroll down there is an option to define the
threshold value. Let's put 5 GBP there. That means that if our bill goes above £5 per month, we will get notified. Modify that amount to something you are comfortable with. Let's click next.
Now let's create an SNS topic so that we are subscribed to that alert. In the SNS topic section, click on
create new topic. Now let's enter a name for that topic. That name has to be unique so the more descriptive the better. I named mine Free_tier_exceeded. Then we can add the email we want this subscription to notify. Click on create topic.
There is a link to view that notification in the SNS (Simple Notification Service) console, let's click there. It opens the SNS console in a new tab. Under subscriptions we see the one we just added which has status pending confirmation. If we open our email we put earlier, there is a new email to confirm the subscription. Before we confirm anything let's first finish creating the alarm.
Back at CloudWatch tab, for now let's ignore the rest of the options and go straight to the next step. Now let's give our alarm a name and description. I put Free_tier_alert and Email me when my bill goes above £5. Let's click next.
Now we can see a summary of everything we just put along with a Graph for estimated charged. Finally let's click on create alarm. The alarms page in CloudWatch should look like that.
Now it's time to approve the subscription email we received earlier. Clicking on the refresh button of the billing alarms page, now shows the actions set to 1 action(s). The state however is still showing us insufficient data which is ok as we do not have any charges yet.
Now we can go and start playing around with AWS services and in case we forget to remove something that charges us over time, we will be notified. Happy hacking.
Top comments (0)