In this blog post, we are going to make a few configuration changes to our account. We will also set a budget that will alert us when we are forecasted to or have exceeded a certain threshold in terms of the dollars spent each month.
What we will do is set an alias that makes it easier to log in when using the Identity and Access Management service for login. We will enable access to billing for IAM users. We will update our billing preferences with a few settings and then create a budget with an alarm associated with it.
I am currently logged into my account using the root user. We will set up an IAM user later on. Now, I want to navigate to the Identity and Access Management service by searching for IAM. When I click on IAM, it will take me to the console for this service. It is a global service, so we do not need to select a specific region. This means that we only have to create resources like user accounts in one place. On the right-hand side, we can see the AWS account with the account ID and account alias.
There is a sign-in URL for IAM users, which will be used to create users in future lessons. By default, it includes the account ID, which is not easy to remember. Therefore, we will create an account alias. I have set my account name to DC T Lab Training, and if you need to change it, you can do so on the account tab. I will create an alias that is the same.
Now, this needs to be unique across AWS. Let’s see if I can get this one to work. I now have that alias. If you try to use the same one, it won’t work because it’s already been taken. This means I can click on the sign-in URL and simply use it for logging in. I will take note of this somewhere so that I can use it for logging in as an IAM user. The next thing we are going to do is make some changes to our account settings.
I will click on the top right-hand corner, select the account, and on this page, we can change the account name if needed. I have already set mine to the account name that I want. Let’s scroll down on this page a bit. We can see some of the regions that have been enabled by default. Not all regions are enabled by default, you have to enable certain regions if you want to use them. In this case, plenty of regions are enabled for me. Now down here, we can see the IAM user enroll access to billing information.
Once we have created an administrative user account using IAM, we will no longer log in as the root account. Sometimes you will want to access billing information and you will be told you have to log in as the root account. If we enable this setting, we won’t need to do that. We can assign the relevant permissions through IAM and then access the billing information when needed. So I have set that setting. Next, on the left-hand side, I will come down to billing preferences and under alert preferences, I will select the option to receive AWS free tier alerts and receive CloudWatch billing alerts. I need to input my email address here.
This means I will receive an email alert if I use up my credits for free tier usage. On the left-hand side, I will enable the option to receive my invoices by PDF so they are attached to my email. It’s easier than having to come back into AWS to look up what I have been charged for. The last thing to do now is on the left-hand side, under budgets and planning, I will click on budgets. This takes me to the AWS budget service where we will create a budget. Under budget setup, I will use a template.
It’s up to you if you want to use a zero spend budget if you are really cost-sensitive. I like to set a monthly cost budget and I’ll set it to $5. This means I will get an alert in my email when I am forecasted to reach my $5 across the month, or when I actually reach it. It says here that I will be notified twice, once when my actual spend reaches 85% and then when it reaches 100%. There are occasional charges for certain things like hosted zones. Once we create a Route 53 hosted zone, it’s usually less than a dollar a month. And there are some other small charges occasionally, a couple of dollars here and there.
But we shouldn’t go over $5 except when we register a domain which will take us over that because the cheapest domains are about five or $6. I will enter my email address, and create the budget, and that’s all I need to do. It will set everything up for me. That’s it, I have set up my budget. It’s a very important step. You want to make sure you do this. As long as you follow my instructions and shut down and terminate resources, you should not exceed this budget except when registering a domain. However, if you forget something, at least you have a backup and you will receive an email warning. Then you can come into the Cost Explorer service.
So on the left-hand side here, if I scroll up, we have the Cost Explorer. In Cost Explorer, you can have a breakdown of your spend. There’s nothing here yet as I have to wait 24 hours since I just opened this account. But then you will be able to come in and see an itemized breakdown of your spend.