Practice Exams:

Amazon AWS SysOps – AWS Account Management part 4

  1. AWS Budgets

But now let’s talk about AWS budgets. And this service is actually very similar to Cost Explorer. The only difference is that now you can send alarms when a cost exceeds the budget, and we’ll see how to create these budgets. So there’s three kinds of budgets you can create. There is usage, cost and reservation. We’ll see those in detail in the hands on. For the reserved instances, though, you can get utilization tracking, and you can also get support for EC Two, elastic cache, RDS and Redshift. You can upset up to five SNS notifications per budget. So you can send emails, you could trigger lambda functions, whatever you want. And you can filter by a lot of things service linked, account tag, purchase options, et cetera, et cetera.

The idea is that you have the same options for filtering as AWS Cost Explorer. The first two budgets are going to be free, and then you’re going to pay two cent per day per budget that you set up in your console. So let’s go have a look at budgets and how they work. Okay, so let’s go to budgets. And currently we have no budgets, so we have to create it, and basically based on it, we’ll get to send notifications. So let’s create a budget. And as we can see, we have three kind of budgets. We have cost, usage and reservation budget. So let’s just go on cost first and get an idea of how it works. Cost is basically going to say what you want to track as a cost.

So you can say overall AWS Cost, but this is no better than just a billing alarm. But you could say AWS. Cost. For EC Two, you could choose a period monthly, quarterly or an annually, and then the budgeted amount. So for example, for this, I will say I want to have $10 as a budget amount. Now, when you’re done, you can say whether or not it’s going to be a recurring budget, so whether or not every month is going to renew or an expiring one. And then you have to set an end month. I’ll set it as a recurring budget. And here you are able to filter. So you are able to filter based on the service. So based on the filters we have right here, we’ll get to see this graph.

And this graph is directly generated from AWS Cost Explorer. So this is very linked budgets and Cost Explorer. So for service, because we’re talking about EC Two, I’m going to search for EC Two, which obviously I can’t do because the search is not working. So we’ll just scroll down and get to talk about EC Two instances, for example, and Elb and other I’ll apply the filter and here we go. This is my service cost. So as you can see, there’s a tiny blip here in September 2018. But for the main part, I’m under my $10 per month. But you could also just drill down further, you could say whether or not you wanted just to see this for your instance type being maybe your T two micros.

So we’ll say, okay, only my T two micros. I’m actually worried about. I want my T two micro cost for EC Two to be less than $10. So you can have some really interesting budgets. You can also say, hey, I only want to monitor this for my region I’m running right now. So EU Ireland. And that’s it. It’s really, really neat because now basically you can have a very, very detailed, quote, unquote alarm or budget it, hence the name budget for your alias cost. So you can just be very creative here and really control your cost on AWS. Then you have some advanced options if you wanted to incur some tax, include some taxes, refund credits, et cetera. And then when you’re done, you configure the alert.

So you have two kind of alerts. The first alert is on actual cost, which is actual incurred cost. So when I do go over my $10 of budgeted amount, I will get an alert. Or you can go on forecast cost and forecast is cost, saying, okay, you have launched an instance today you incurred $2, but it seemed like in five days you’ll have $10. So I’m going to tell you right away that’s based on what you’ve done right away, today you will go over your budget. So it’s really interesting to know whether or not you want to be on actual cost or forecasted cost. And then you’ll say, okay, I want to know when I’m at 80% of my budgeted amount or my dollar amount, whatever you want.

And then the email contact is going to be Stefan@example. com. Great. You can also notify by SNS. And for this you have to manage your SNS topics and add an SNS topic. Here we confirmed the budget and this looks great. Here is my filter, EC Two, T two micro, region is Ireland, and I want all my costs, including taxes, etc, etca. This looks fine. And for my alert, my alert one is going to be for actual cost. But by the way, if I wanted to, I could have added a new alert, this one on forecasted cost, and maybe this one for 90% of my budgeted amount and also email myself just to show you how it’s done. Okay, confirm the budget.

And now we have two alerts on this one budget. So it’s really, really cool. Then I’ll create it. And here we go. I have my first budget being created. So as you can see, the budget is there within cost, usage and reservation. So we’ve seen cost budget, but let’s have a quick look at usage and reservation. So usage is to see how well we’re using some budget. So let’s have a quick example. The usage type, for example, could be for EC Two, elastic IP data transfers, Elv data process. So this is more of the usage cost of your AWS account. So you can say, okay, I don’t want to use more than X number of gigabytes for my street data transfer in. So we’ll say, okay, the budget amount is going to be 1000GB.

So here we’re not talking about a dollar amount directly, we’re talking about a metric. And where you can budget against that metric, you also get a nice way to see how it is in Cost Explorer. So with this graph and you get an idea of whether or not you are at budget. So it could be really cool, but here I invite you to just look at it and look at all the options you have right here. It could be on EC Two EBS IO request, it could be on RDS, on running hours of EC Two for Elastic Cache, whatever you want really. So really, really cool. And finally for Reservation Budget, it builds upon what we have for Reserved Instances utilization and Reserved Instances coverage from AWS cost Explorer.

But now we can say okay for the service, and we have to wait for it to load. But we’ll say daily EC Two ri utilization. We’ll say okay RH utilization. And I have to wait for EC Two to load. But they won’t actually work because I don’t have any reserved instances. But if I had, I could create a budget and basically track my reservation budget in this UI. So I hope that makes sense. I hope that ties in how Cost Explorer and budgets are linked together. And then, although you get one free budget, you’re more than welcome to go ahead and delete it. So finally, if you were to receive an alarm or an email, this is what it would look like.

It’s actually much nicer than the billing alarm email. So it says, Budgets, monthly budgets has exceeded your alert threshold. And it says, Dear Customer, you requested that we alert you when the actual cost associated with your budget exceeds $8. And it turns out that I spent $18. 16. So here is basically the Csv that shows me what happened. And then I go and click on go on to the Elizabeth’s Dashboard to understand what happened and maybe use Cost Explorer to navigate my bill. So that’s it. I hope that was helpful and I will see you in the next lecture.

  1. AWS Cost Allocation Tags

Okay, so finally, for cost tracking, let’s talk about cost allocation tags. So, we all know tags, tags are used to track resources that relate to one another. So we can tag our EC two instances, our S three buckets, we can tag pretty much everything. But for tags to show up in a cost report, we have to say that these tags are named cost allocation tags. So we’ll see how to create this in a second. But so just like tags, tags, they are just normal. But the difference is they will show up as columns in the reports. So you have two types of cost allocation tags. The first one is created by AWS. They’re AWS generated cost allocation tags and they’re automatically applied to the resource you will create.

And they will start with a prefix AWS. For example, if you create a resource, there will be a cost allocation tag, AWS created by, automatically by AWS for you. And these cost allocation tags, when we enable them, they won’t be applied to resources that were created before the activation. Now, for user tags, they are the tags that are defined by the user. So the tags that we add manually or automatically using the cli in the console, okay? And so all these tags will start with a prefix user. And the cost allocation tags will just appear in the billing console. Now, just note, it can take up to 24 hours for the tags to show up in the reports.

So let’s go and have a play with it. Okay? So for cost allocation tags, it’s on the left hand side. And as we can see, we have two different kind of tags. As I said, AWS generated tags and user defined. For AWS generated tags, to just activate them, we click on activate. And if you read this, basically they are applied any time you create a resource. And this feature is only available in this console, the Billing and Cost Management console, they will not appear in the Ms console, including the tag editor. So we won’t see them directly attached to our resources. They will only be seen through this console right here. And then we have user defined cost allocation tags.

And these are all the tags that we basically defined over time. And we can say that one of these tags should be a cost allocation tag as well. So, for example, environment is quite a good tag because maybe we want to separate our cost by dev, test and prod. So we will say Environment is a cost allocation tag as well. So it can take up to 24 hours. So we’ll activate this one as this tag, and now the tag environment is active as a cost allocation tag. So what this means now is that if I create an EC two instance and basically tag it with Environment, I’m going to be able to filter this in my reports.

Now, the reports can take a bit of time to get updated. But basically I’m just going to show you what I mean. So I’ll take an instance that’s not free tier, so I’ll take maybe a T too small and I’ll configure the instance details at storage, at tags and here on these tags I’m going to add some tags and I’m going to say the tag environment is going to be equal to the value dev. And basically this instance is tagged with dev. Then I’ll click on review and launch, launch it and launch instances. And so now basically, if you’re really good with tagging in your environment, you start tagging every resource for the corresponding environment.

Eventually, thanks to cost allocation tags, when I go to my reports, my cost exploring my budget, I can basically filter and get some information sliced by environment. So I’m not going to show you this because it takes a little bit of time sometimes for Budget and Cost Explorer to get updated, but you get the idea. So the exam will ask you, hey, how do we basically make sure that we can slice and dice our cost by tags or environment or whatever? The answer is use cost allocation tags. So that’s it. That’s a very practical way of basically controlling your budgets and basically allocating your cost to different costs. I hope you liked it and I will see you in the next lecture.