Amazon AWS Certified SysOps Administrator Associate – AWS Account Management Part 5
Let’s go through creating a billing alarm. And billing data is going to be stored in only one region. It is us, East One. And this is in Cloud Watch. But the data is going to be for your overall worldwide cost, okay, so not just for that one region, it is only stored in one region, but represents worldwide cost, and it’s actual cost incurred into your account, not for project specific cost.
So let’s go ahead and create an alarm alarm together. So for this tutorial, please make sure that you are selecting US East, Northern Virginia, US East One as an option because this is how you access your billing alarm. Then you go into the Cloud Watch console and to find your billing alarms, you need to go on the left hand side into alarms and then billing. So this only appears in UST east one. So this is where you can create your billing alarms, and this is to see whether or not you have alerts based on your actual spend.
So let’s create an alarm and then we just select the metric. And so here the metrics are going to be related to your billing, okay? So the first thing you have to do is to enable billing alerts. So let’s go to my billing dashboard and then on the left hand side, we have billing preferences, and then we can click on Receive Billing alerts. And this is to enable monitoring the usage charges and fees.
So you need to enable this, and then you need to wait about 15 minutes for your data collection to be active. So I’m going to enable this and pause the video and wait. Now that I’ve activated my billing alerts, I can go into Cloud Watch and start looking at my billing data. So I waited about maybe two or 3 hours to get back to you. So now if I go on the left hand side under billing, I can create an alarm and select a metric. And here I have access now to the billing metrics and they would not appear if you did not enable that take box here and let it give it some time to populate.
So we get by service and so we can get a billing by service. So if you wanted to control, for example, your Amazon EC two cost, you could just take that and if you wanted to just look at your overall cost, you would go one level up and then you go total estimated star charges and you would click on it. Now obviously this is not showing something very, very interesting right now because, well, I only have one data point and it’s $1. 36, so I don’t spend a lot of my accounts.
But at least you could select this metric, for example, and then you could, for example, define a condition being static and saying that if you become greater than $10, then please send me an alarm, okay? And the alarm could be, for example, that you should send it out to an existing SNS topic and create the relevant SNS topic.
So that’s it for building alarms. I hope that makes sense. So remember, you can set them at two levels. You can send them on the metrics at the overall spend for your account, or you can also send it by service and drill down for the service you want. For example, Amazon is free, SNS config and so on. Okay, so that’s it. I hope you liked this lecture and I will see you in the next lecture.
So a small service that can come up in the exam is a billing service called Cost Explorer which is used to visualize, understand and manage your AWS cost and usage over time. It allows you to create custom reports that analyze your cost and usage data. And so with this you get dashboards and diagrams and so on. And so you can analyze your data at a high level, for example, total cost and usage across all accounts, but you can also go down to get it monthly, hourly, or at the resource level. Granularity and then thanks to Cost Explorer, you can do some cost savings because it allows you to choose an optimal savings plan to lower the prices on your bill.
You can forecast usage as well up to twelve months in the future based on previous usage which can be very helpful for cost planning. So if we look at Cost Explorer, here’s an example we get monthly cost by either a service. In this example, we can see, for example, that some instances based on instance type can be more expensive than others. And so we can start optimizing our cost, asking ourselves the question are these instances correctly used?
Are they maximally used? Are they the right size? These kind of things? Then we can get also hourly and resource level. So in this example we get again some EC two instance resource level information and we get the cost over time so we can see what happens every single hour to get a better breakdown and understanding of our bill. This is also to find, as I said, a savings plan. So savings plan is an alternative to reserve instances. We have seen this and so thanks to Cost Explorer we get this little pop up that will come up and it will tell us what kind of savings plan we can have based on our usage and it will give us some recommendation and give us some estimated monthly spend and so on. So this is quite handy. Finally we can forecast usage so based on previous costs that we had in the past, we can get some forecasts and some confidence of the forecast around how much we’re expected to pay for our bill based on our previous usage and that could be quite helpful. So these kind of use cases can come up in the exam and this is probably the only bill service that AWS will ask you in the exam. So that’s it and we’ll see you in the next lecture.
You would use AWS budgets if you wanted to create a budget based on actual charges or future estimated charges and same alarms whenever your cost will exceed your budgets. So you have four types of budgets you can set in the Budget console. You can use usage, cost, reservation and savings plan, and we’ll see them in a second. In case of setting a budget for a reserve instance, you can track utilization of your reserved instances overall, and it supports our eyes. For different services such as EC, Two, elastic Cache, RDS and Redshift, you can set up to five notifications per budget, and you can filter your budget by many different options such as service, Linked, account tag, purchase options and so on. So that means that you get a lot of options actually the same as Cost Explorer. And so that makes budget something that is going to be a lot more granular, a lot more flexible when it comes to tracking your costs and setting up alarms than, for example, your billing alarms.
So the first two budgets are going to be free and then you’re going to pay two cent per day per budget. So now let’s go have a look in the console to see how budgets work. So from the search bar, type AWS Budgets and you will go into the Budgets console. Now, the Budgets console is also accessible from the left hand side if you go into here and then do my billing dashboard, okay, it allows you to create budgets. So we’re going to create a budget. And as we can see, we have four different kind of budgets. We have a cost budget, a usage budget, a savings plan budget, and a reservation budget. So let’s go ahead and just do the cost budget for now.
So we’re going to click on next and then we’re going to set up a budget amount. We’ll scope the budget if you wanted to narrow to specific services and so on, and then enter the budget name. So the period of the budget could be daily, monthly, quarterly or annually. So a lot of possible options in here and it could be recurring and it renews on the first day of every month, or if expiring and you would set an end month for your budget. So we’ll say recurring and it starts this month, then choose the budget type. So is it a fixed or a monthly budget planning? So you get a lot of different flexibility here if you wanted to set budgets for different months at different levels. But let’s say for now, we want to set a ten dollar budget. Now actually, this month I’ve spent maybe $1. 36.
In the previous month I was under. So we can see here the unblinded cost of my budget. And we could explore this cost, by the way, in Costa, Florida, to get more information. As we can see, my budget right now would be well over my actual cost okay? Next you can add some filters. So you can select the Dimension for example service, and you can say, hey, I just want this budget to be regarding the EC Two console. So you would go to EC Two instances, for example, and this would only filter and you could apply this filter and this would only filter the cost for that filter. So as we can see right now, my costs are zero regarding that filter. So that means that I don’t have any EC Two related cost, but if I went into Kms for example, or key management service, here we go and then apply the filter yet again, you could see that some of my costs actually do come from Kms. So I could create a budget specific to the Kms service. Next you could aggregate costs by unlimited costs, armour ties or blended cost, different options, okay? And the types of charges and fees that you want to have within your budget.
So lots of different options if you want a budget name, so we’ll call it Kms Budget and click on Next. Here we have the budget amount, so we have Budgeted $10, okay? But we can create alert thresholds. So for example, we’re saying, hey, when we reach 80% of the actual budget amount, then please send me an email at Stefan example. But you could also have an Amazon SMS alert or an Amazon Chatbot alert if you want to send your data into Amazon Kym or Slack, okay? And you could set up a different kind of alert threshold. For example, we’re saying, hey, when you reach 80% of the budgeted amounts, okay, please, what is this on the actual cost or the forecasted cost?
So here we’re saying, hey, when we forecast that we’re reaching 80% of the budget amount, okay, then again, send me an email at Stefan@example. com so we can see that we have different alerts available to us and we can set up up to five, if I remember correctly. Then Next and we can review everything. So alerts and no actions were attached right now, but just email recipients. We could have Amazon SNS or Amazon Chatbots, click on Next, we can review this budget and then create this budget. So my budget has been created and we’re good to go. And from this console we can track the actual amount used, the actual forecast and the current versus budgeted and the forecast versus budgeted, which is quite handy, okay? Now other kind of budgets you can have if you wanted to quickly see them would be, for example, a usage budget.
So this is when you want to track an amount in terms of a specific metric. For example, you’re saying, hey, I want to make sure that I want to look at my EC Two data transfer to cloud front in Gigabytes, and you want to set a budget in Gigabytes for that specific metric, okay? Or you could have a snapshot, EBS. Snapshot how many gigabytes a month am I using? And so on. So have a look. This is more usage related, so to some services or Amazon Street, RDS and EC two. Or we can just have it by usage type. And so we can have a look at data transfers in and out overall in my accounts, or how many times I’m using, how many hours I’m using my T, two micros and so on.
So as you can see, lots of different metrics as well. But these are usage based, okay? They’re not money based. So this is the same idea for the other options. So this is the usage budget then savings plan budget is to track how you’re going versus your savings plan, which is how much you’re actually utilizing your savings plan. And so maybe if you are over, underutilizing, you need to set up a budget and reservation. This is for your reserved instances, okay? So this is for Amazon. You see two RDS redshift. Elastic Cache and Elastic search reservations. So that’s it for this lecture. Now you know how to set up a budget. I hope you liked it, and I will see you in the next lecture.
So let’s have a look at cost allocation tags. So they’re used to track your Adobes cost on a detailed level. So this is the kind of report you would get if you download your cost and report. And then as you can see, you have a column name, total cost, and then you have a bunch of different colors. Use columns user owner, user stack, user cost center, user application, and they are cost allocation tags. Okay, this is because you wanted to separate your cost report based on the different values of these tags. So you have two types of tags for cost allocation tags, you have AWS generated tags and they automatically are applied to the resource you create because they are generated by AWS. And they will start with the prefix AWS. For example, this prefix AWS column created by is very important, that represents who has created a specific resource. And so you could create a cost report based on who has created what. And so you can incur cost back to a specific person.
Now, user defined task tags are defined by the users and they start with the prefix user columns, just as the one on the table on the right hand side. So let’s go in the console to see how we can define these cost allocation tags and use them. So on the left hand side of your cost management, you have cost allocation tags. And as you can see, we have two options. We have the user defined cost allocation tags and the AWS generated cost allocation tags. So if we go in here, for example, and we wanted to enable this AWS created by tag, we could activate it and then once it’s activated, it’s going to be taken into account when generating cost report. So you can see you have a bunch of different generated tags, for example, cloud formation, stack ID and so on if you wanted to. Next, for user defined cost allocation tags, this is if you wanted to define your own tags.
For example, say you are using environments for dev, test and prod and you wanted to separate your cost by environment. In this case, you could activate again a user defined cost allocation tag. And it would be up to you of course, to use that tag properly. So if you go into the EC two and we’re going to launch an instance directly. So let me show you what I mean by that. So we’re going to launch an instance and then Amazon x two T, two micro.
And then on the tag side here, I’m supposed to use the environment tag, for example, development, and this is where that tag would be picked up for cost allocation purposes. Okay? So I’m not going to go ahead and create this instance, but you see that you need to start tagging your resources with your correct tags for them to appear obviously and be separated in this cost allocation tags reports, which brings us to the Cost and Usage Report. So this is a report used to dive deeper into your cost and usage and it contains the most comprehensive set of AOS cost and usage data available. This includes all the additional metadata about your services, pricing and reservations.
So you will get some information about the Amazon EC Two reserve instances in there. So this cost and usage report will list the AOS usage for each service used by your account with hourly or daily line items and anytime you have activated for cost allocation purposes. And this is why cost allocation tags are very important. You can configure it to do daily exports into Amazon is free and then you can analyze this data using Athena Redshift or Quick sites.
So to get that report on the left hand side on Cost and Usage report, I can create a report and then we can say, for example, demo report. We can include resource IDs if you wanted to and then automatically refresh this report if we needed to. Then we need to set up an as free bucket to deliver this bucket, this information to. So we can do it demo cost Report stefan and we’ll use the region US East, Northern Virginia next and then we confirm the default policy that would be applied to the buckets to allow the delivery of these reports. We could say the time granularity that we want, for example, daily and whether or not we want to create a new report version or overwrite existing reports. So I’ll create a new report version. Then we can enable the integration with Athena Redshift and Clicksite if we wanted to, as well as a specific compression mechanism.
Click on next. And also I’ll call it Cost Reports as a prefix next and then review and complete. And this will enable the delivery of this report directly into your sq buckets every day. Another thing you can do is you can enable some of these reports and they can take up to 24 hours to be enabled. Okay, but you can start analyzing your costs using Cost Explorer and you would use the same cost allocation tags as before. You can monitor your Ri using Cost Explorer or you can get AWS usage report and this could be based for any kind of service. For example, let’s do a service that we all know such as Amazon EC Two, which is right here and then all usage types for the current billing period and the granularity is due for last month and the granularity is by days. And then let’s download this report which is a CSV.
And here I am getting my report of the operation, the usage type, the service and so on, as well as chart time, the end time and the usage value. So this is a really, really big report that you can see and when I do have my cost allocation tags in place because it can take a little bit of time to populate, then I will start seeing them as well in this report. So that’s it for this cost lecture. I hope you liked it, and I will see you in the next lecture.
Now let’s talk about AWS Compute Optimizer which is used to reduce cost and improve performance by recommending optimal AOS resources for your workload. So it’s going to do an analysis of your EC two instances, your auto scaling groups and tell you for example which one are over provisioned or under provisioned. And then you can build your optimizations and then you can have a better cost perspective and also a better performance. This way it does it is that it will use machine learning under the hood to
analyze your resource configuration as well as track their Cloud Watch metrics to understand their utilization. So supported resources by Compute Optimizer are easy to instances auto scaling groups, EBS volumes, lambda functions and this allows you to lower your cost by up to 25% without doing much. And the recommendations themselves can be exported into Amazon is free. So that’s it. I hope you liked it and I will see you in the next sector.
Popular posts
Recent Posts