Keep Your Cloud Cost Down & Set Budget Accountability with Azure Cost Management and Billing

Mechanics Team
12 min readFeb 3, 2021

Take a deep dive on Azure Cost Management and Billing, a free tool that helps you set budget accountability and find optimizations to keep Cloud cost down. Whether you are managing your Cloud expenditure, want to ensure a specific workload or project stays within budget, or want to identify optimizations, Azure Cost Management can help. And Cost Management comes free with your Azure subscription, so there’s no excuse not to use it.

Set budget accountability and keep Cloud cost down

Antonio Ortoll, Product Manager for Microsoft Azure, joins Jeremy Chapman to help you understand the costs of everything running in your environment and show you how Azure Cost Management and Billing solves for:

  • Visibility into the workloads and related resources that are driving spend. See spending patterns or even detect specific anomalies in spend.
  • The ability to track spend against budget so you can drive accountability and charge costs back to individual teams or departments.
  • Identify optimizations that can help you to save money through dynamic recommendations available through Azure Advisor, which is integrated with Azure Cost Management.

QUICK LINKS:

01:01 — Solve for visibility, accountability, and identify optimizations

02:05 — Walk through demo

03:26 — Custom aggregate view

04:41 — Budgets by cost center

07:06 — How to keep track of your budget

10:22 — Optimizations to save money

12:46 — Track spend across different Cloud implementations

14:17 — Closing notes

Link References:

For more guidance check out https://aka.ms/acmdocs

Download the Azure Cost Management and Billing App for Power BI at https://aka.ms/ACMApp

Watch the episode for optimizing your Cloud investments at https://aka.ms/AzureEconomics

Learn more about enforcing budget caps through automation, and see our sample scripts at https://aka.ms/acmrunbook

Leverage our Azure Consumption APIs at https://aka.ms/acmdocs

Unfamiliar with Microsoft Mechanics?

We are Microsoft’s official video series for IT. You can watch and share valuable content and demos of current and upcoming tech from the people who build it at Microsoft.

Video Transcript:

- Coming up, we’re joined by Azure expert Antonio Ortoll for a deep dive on Azure Cost Management and Billing, a free tool for granular visibility and management of your cloud spend for your workloads in Azure and in other clouds that’s going to help you set budget and accountability and find optimizations to keep costs down. So Antonio, welcome to Microsoft Mechanics.

- Thanks for having me on the show.

- I’m really glad that we’re addressing this topic of cost management head on, because it’s really an area that we get a lot of questions on, because if you’re confident in your spend, the more confident you’re going to be, then, adopting the cloud. But it’s easier said than done, right?

- Right. What the cloud gives you with resources on demand is pretty liberating, but at the same time, you don’t want to be caught with unpredictable costs that breaks your budget. And, of course, this can get really hard if you’re trying to manage the costs of running your cloud resources across your organization.

- That’s right, and we recently covered this in the core levers, basically, for optimizing your cloud investments with Matt McSpirit, and you can watch that episode at aka.ms/AzureEconomics. But how does then Azure Cost Management and Billing help out here?

- Well, at tactical level, it really boils down to three things we help solve for. First is having visibility into your workloads and related resources driving spend to see spending patterns and even detect specific anomalies in spend. Second is the ability to track spend against budget so that you can drive accountability and charge costs back to individual teams or departments. And third is being able to identify optimizations that can help you to save money through dynamic recommendations available through Azure Advisor, which is integrated in Azure Cost Management. So, whether you’re managing your cloud expenditure all-up, want to ensure that specific workload or projects stay within budget, or want to identify optimizations, Azure Cost Management is there to help you.

- And the nice thing is here, Azure Cost Management comes free with your Azure subscription, so there’s no excuse then not to use it. But a tool like this is only as good as the groundwork that you put in, so what’s the trick in terms of getting this to work for your organization?

- Well, even if you do nothing at all, we will help you understand the costs of everything running in your environment, so let me show you. To access it, just open the Azure portal and search for Cost, select Cost Management and Billing. From the overview, go to Cost Analysis. This brings you a default accumulated costs view for quick visibility of your overall expenditure across your entire account. You can select between different chart types. I’ll select the column view. By default, charts display the accumulated spend for your current billing month, but you can also choose monthly or daily views, or look at costs across a selected date range. Here, I’m filtering by a specific week in December. And we give you your actual costs, or amortized cost if you have purchased Azure reservations. Now, to track spend even farther, you can establish cost centers and budgets which we will drill into in a bit later, but it’s the best practice to track consumption and spending patterns right down to the resource level. One of the key things you will want to do is to set policies to ensure that resources are tagged at the time of deployment. This is key if you want to reassign costs to different groups or departments, and there are multiple policies that can help you tag resources to monitor spend.

- Alright, and by the way, there are lots of great resources where you can learn more if you go to aka.ms/costmgmt/videos. So now, Azure Cost Management’s going to collect the signals, then, from tagged resources to track costs, but how does this information then get rolled up into more aggregate views?

- So, back in Azure Cost Management, you specify the set of data you will want to look at. Here, you can pick across different usage attributes across your scope, what we call dimensions, to provide more filtered views of your cost assessment. I will start by choosing the last quarter of 2020. Now I’ll select Location, and I can see charges broken down according to where my workloads are running. This is in proportion to my overall total. I can also see cost forecast through the end of the month based on my current consumption patterns. I can also change the dimension to look at charges and forecasts by subscription. As you can see, I have a few here, and it lets me see the top 10. And I can get a drill-down based on what I’m interested in. Because of my tagged resources, I can get granular cost visibility down to the resource group level. To do that, I will add a filter for Resource Group and select the one I want. And I will drill down, even to the resource type. So, I’ll remove my filter for resource group, and if I’m interested in seeing cost at a service level, and want to see, for example, how much my VMs are costing me, I can add a filter based on Service Name and define virtual machines as the service. Then I will group by resource to see associated cost with my VMs.

- So, what about, then, budgets by cost center? Can you see those, too?

- You can. If you have already assigned specific budgets, you can also track progress against budget. From the budget dropdown, you can see budgets that have been created. I will select the ACM department. With the accumulative spend view, you can see your spend trajectory, when you are likely to exceed budget, as noted here by the red line. The forecast amount exceeded is shown by the red triangle, which is based on your run rate. And by looking at the daily view, you can also see prorated costs and how you’re tracking against your daily budget.

- Okay, but that said, you probably don’t want to give this data or expose it to everyone in your organization, so how do you control who sees what?

- You can set permissions using Role-Based Access to offer users the appropriate exposure to cost. The management group, subscription, and resource group owner will determine who gets to see what. Under Access Control, you will search for Cost, and there are two roles you can assign: Cost Management Reader that allows you to view cost, and Cost Management Contributor that allows you to, for example, set budgets. And for enterprise customers, if you are an enrollment admin, you can set permissions for your finance department or account owners in the enterprise portal.

- You mentioned earlier that you can also set budgets against cost centers for your organization. How would something like that work?

- You can also do that in Cost Management. So, here, I’ll select Budgets, and you can see all the budgets that I have configured. I will hit Add to create a new budget, then you determine at what level or scope you want to set your budget. I will keep Contoso, but I could also set a budget for the entire account or a specific billing profile and department-cost-center. Then, using filters, you can specify budget against a specific dimension. I will add a filter like we saw before for resource type. And that could be a service or subscription, tags, or more. I will choose Service Name, then I will look for virtual machines and add it. Then I will give the budget a name, set the budget reset cadence, then choose month, and then specify how long the budget is valid for. I will select 2021. And I’ll select my budget amount. And the nice thing is, as you set your budget, it will immediately give you a historical and forecasted view so that you can make sure your target budget is within the right ballpark.

- Got it. So, what options, then, do you have if you’re on strict fixed budget, for example, but aren’t really looking at Azure Cost Management every single day? Is there a way to keep track of your budget?

- So, the next step as you set up your budget is to set up alerts for when certain budget thresholds are met. So, as you can see here, you can set up thresholds to alert you at different levels of utilization. I will set up alerts for 50%, another for 75%, and another for 100%, and I can even set up a threshold allowing for the certain level of overage. Say, 150%. You can add up to five thresholds if you want, and determine who gets the alert. This can be via email. I will hit create, and that’s it. My budget is set, and alerts will be sent whenever one of these thresholds is reached. And one more thing, under Cost Alerts, you also view all of your active alerts from where your thresholds have been exceeded.

- Okay, so can you now use then, automation, for example, to kick off specific activities then, when one of your thresholds is reached?

- You can. Using Action Groups, you can define specific actions to be taken at either the subscription or at the resource group level when you reach thresholds. This uses a Webhook or Azure Function to trigger specific automated actions using scripts or a runbook. For example, we can use a Webhook to trigger this. and here, we can shut down a VM as it hits a specific cost threshold. If you want to learn more about enforcing budget caps through automation, you can see our sample scripts at aka.ms/acmrunbook.

- Cool. So, how can cost management then help you spread the costs of shared services? You might have things, for example, like multiple virtual machines that are using the same network infrastructure and you only want to allocate those costs back to the departments themselves or the applications that use them. How would that work?

- Well, we have a capability called cost allocation which allows an invoice administrator to reassign or distribute the costs of shared services like, for example, ExpressRoute. So, let’s look at that. I will set up a cost allocation. When you add one, you first give it a name, select source, which can be a subscription as the default, resource group, or tag. I will keep subscription and search for Trey, then pick Trey Research Finance. I will see costs for the last 30 days. And now, I can then select my targets, different departments, cost centers, in this case, Finance and HR. I will click Next, and, from here, I can decide how I want to distribute costs across these targets. I can distribute cost evenly, which is by default, or proportionally, or set up a custom rule. If I pick, for example, Proportional To Total Cost, Cost Management will automatically calculate costs based on actual consumption, and I can see my finance department is allocated most of the spend at 80%. And now, if the Finance department goes back to Cost Analysis, as they monitor their spend, they can choose the Cost Allocation dimension to see how much of their monthly charges have accrued from the allocated spend from shared services, as you can see from My CA Rule here.

- Great, so now you have the right level of visibility and accountability, but what’s the best way, then, to look for optimizations that will save costs?

- Yes, that’s very important. Azure Advisor is a service accessible from Azure Cost Management and Billing, and it’s always been the best place to start when looking for ways to reduce and optimize cost. If we go back to the portal, it shows you recommendations by subscription that you have access to. You will see things like Azure Reservations, database, and storage workloads, and more. An interesting one here is Azure Reserved Instances, where, for example, if you make a commitment for over year or three years, you can get discounts. For all of this, we look at usage patterns over 60 days to calculate recommendations.

- Right, and one thing to note here if you have underutilized VMs, you’ll even find right-sizing recommendations or where it make make sense to shut down some unused VMs, but can you dig a little bit deeper into these areas for us?

- Beyond these in-portal recommendations, if you’re an enterprise customer, we also have created a set of reports that integrate with Power BI. This allows you to assess optimizations across your entire account, not just the subscription level. You just need to download the Azure Cost Management and Billing App for Power BI at aka.ms/ACMApp. This app includes a set of built-in reports that offer insight into additional cost optimizations, such as Azure Hybrid Benefits for Windows Server, which allow you to view your on-premise Windows server license usage in Azure. Here, you can also see recommendations to help you optimize savings based on your core or vCPU utilization, or you can explore recommendations like the ones for Azure Reservations in the report. I will click into VM RI Coverage. Here, I can see a drill down of recommendations by region and potential savings for Azure Reservations, such as here in Brazil for the BR south region at around half a million. I can click in and it defaults to one year, but I could also choose three years if I want. And one more useful report if you already have an Azure Reservation, I can keep an eye on how much an Azure Reservation is saving me. So, under RI Savings, it also helps me gauge on how well I’m doing with reservations I have purchased for committed resources, and you can see here, for example, that I’m currently saving $110 per month.

- Right. So this then gives you a consolidated view, then, of cost management data, really for offline analysis and reporting on your Azure spend. But what if you want to track your spend, then, across different cloud implementations?

- Well, we recently announced a connector that you can use to configure for AWS cost monitoring. This pulls in AWS consumption data into a management group so that costs can be represented in Azure Cost Management. So, for example, if I select my AWS configured management group called Trade Research, I can group my costs by searching for and selecting the Provider dimension. That shows me my cost chart, in this case, for AWS and Azure, and next, I will filter costs by provider and make it equal to AWS by checking this box. And now, I can see a full breakdown of costs by service, location, and enrollment account.

- And that all means you can forecast, budget, and analyze expenses across clouds under one pane of glass. So, one thing: if you have existing reporting systems, then, how does ACM work with those?

- So that’s what our Azure Consumption APIs are for. They give you programmatic access to cost and usage data for your Azure resources. You can get a full list and guidance at aka.ms/acmdocs under references. Also, you can use our Exports capability to automatically publish your billing data to a storage account on a daily, weekly, monthly, or even on a one-time basis.

- Right, that looks pretty straightforward. So thank you so much, Antonio, for a really comprehensive overview of Azure Cost Management and Billing. It’s really great to to see the granularity of views that you can get to understand your operational expenses, as well as the control you have to drive accountability over budgets and even chargebacks and identify the areas for cost optimizations, but where can people go if they want to learn more?

- The best way is to try it yourself, directly from the Azure portal. It is free to all subscribers, and for more guidance, check out aka.ms/acmdocs.

- Thanks again, and keep checking back to Microsoft Mechanics for the latest tech updates, including more in our series on Azure Cloud Economics. Subscribe to our channel if you haven’t already, and thanks for watching.

--

--