AWS Cost Categories: A Better Way to Organize Costs

Author Alexander Yu

Last updated 24 Jul, 2024

10 mins read

AWS Cost Categories: A Better Way to Organize Costs

If you’re a user of AWS Cost and Usage Reports (CUR), you’re probably all too familiar with the frustration of trying to create order from the vast amount of cost data at your disposal. While the CUR provides a wealth of information, it often feels like trying to drink from a firehose when all you want is a neat, organized view of your expenses. You may have already spent hours poring over spreadsheets or running SQL queries, wishing there was a better way to categorize and analyze your costs.

This is where AWS Cost Categories come in. Unlike traditional tags or cost allocation tags that require meticulous tagging of each resource, Cost Categories allow you to group costs based on user-defined rules, making it easy to see spending patterns at a glance. This new feature is a game-changer for anyone managing a complex AWS environment and is worth familiarizing yourself with sooner rather than later.

In this article, we’ll explore how AWS Cost Categories can transform your cost management process. We’ll compare them to tags and cost allocation tags, and show you how to set them up to gain better insights. Let’s start with an overview of Cost Categories, before then walking you step-by-step through setting this up for your own organization.

What are AWS Cost Categories?

In AWS, costs are usually attributed to specific AWS accounts. This is fine for smaller setups, but tracking costs by account for a large organization doesn’t provide much insight, and can also become a real headache.

The existence of AWS Organizations does make things a little better, since it effectively allows you to consolidate multiple accounts under a single payer account. However, even this solution falls short when you need a clear, organized view of spending across different teams, projects, or departments.

This is where AWS Cost Categories shine. They provide a super flexible way to organize and manage your costs. At its core, Cost Categories operate based on two main concepts: category names, which you can customize to match the structure of your organization, and custom rules, which automatically group new and existing costs into these categories.

Ultimately, you can use AWS Cost Categories to tailor your cost management to fit the unique needs of your organization. Once you’ve got it set up, you’ll never go back!

Org Chart Example: Why You Should Use AWS Cost Categories

To see the full power of AWS Cost Categories, let’s use an example. Imagine you’re part of a company with the following basic org chart:

Here, your company has two main business functions: Engineering and Marketing.

The Engineering department is broken into Team Alpha and Team Beta; similarly, the Marketing department is broken into Team Gamma and Team Delta.

Team Alpha owns Account 1, Team Beta owns Account 2, while Team Gamma and Delta share ownership of Account 3.

Your company is working on two main projects:

  • Project A involves teams Alpha and Gamma. So, it uses resources from Account 1 and Account 3.
  • Project B involves teams Beta and Delta. So, it uses resources from Account 2 and Account 3.

Any company must also take into consideration shared costs of things like infrastructure (i.e. for teams Alpha and Beta in Engineering) or software tools (i.e. marketing tools for teams Gamma and Delta).

Now, let’s pose some questions:

  • How much is Engineering spending?
  • How much is Team Alpha spending, considering shared costs?
  • What is the cost of running Project A, where multiple teams (i.e. Team Alpha, Team Gamma, and shared resources) contribute?

One would think these are simple questions that any financial team should be able to answer. Yet, answering these questions can be a challenge without a clear way to categorize and analyze your costs. By using AWS Cost Categories, you can group your costs based on your exact org structure, and create custom rules to automatically sort expenses. This makes answering the above questions easy, and almost trivial.

Finally, AWS Cost Categories also integrate seamlessly with Cost and Usage Reports (CUR) and Cost Explorer. If you use these tools already (and you absolutely should), Cost Categories builds upon this to give you the ability to analyze and visualize this cost data down to the specific team, project, or resource.

How To Create and Manage AWS Cost Categories to Organize Cloud Expenses

In this section, we get into the meat and potatoes–a step-by-step AWS Console walkthrough to create categories that can help us answer the questions we posed earlier. But before we dive into the step-by-step guide, you’ll need to understand some key concepts and terminology related to AWS Cost Categories.

Concepts and Terminology

First up, we have Cost Category Names and Cost Category Values. A Cost Category name is the broader group “type” you’re creating, and its associated Cost Category Values are the specific “types” themselves.

For example, you might have a Cost Category Name called “Business Function”. Under this category, you’d have Cost Category Values such as “Engineering”, “Marketing”, or “Finance”. Each value helps break down your costs into more manageable and meaningful chunks.

Once you have categories, you’ll create rules to help AWS categorize each new expense. To do this, we need to discuss three more important concepts in Rule Types, Dimensions, and Operations.

  • Rule Types define whether you want to use a statically defined cost category value, such an account ID, or a dynamically defined one, such as a tag with your own custom values. The Regular Rule type uses static values, while the Inherited Value type supports dynamic values.
  • Dimensions refer to the specific attribute values you’re using to define your rules. For example, if you’re creating a rule based on account ID, Account is the dimension.
  • Operations are the logical operations (i.e. equals or contains) that you use to apply your rules to the dimensions.

Lastly, we have Split Charges. This feature is super handy when you have shared costs that need to be divided among multiple categories.

For instance, if both Team Alpha and Team Beta share infrastructure costs, you can use Split Charges to fairly allocate those expenses between them. This ensures that each team is accurately billed for their share of the costs, making your financial tracking more precise.

With these concepts under your belt, let’s now see them in action.

Console Walkthrough

Let’s recreate our example org chart in AWS Cost Categories. We’ll start from the bottom and work our way up–this means we’ll create the team-level cost category first. We can do this using the following steps:

  1. Navigate to the Billing and Cost Management Console.
  2. In the left menu, choose Cost Categories.
  3. Choose the Create cost category button. You’ll see the following screen:

The large header that reads My cost category should be replaced with your intended Cost Category Name. Under the Rule builder tab, you’ll create rules that sort costs into various Cost Category Values. Let’s proceed:

  1. Rename the current Cost Category Name to Team.
  2. Then, choose Add rule.
  3. Choose Account as the dimension, Is as the operation, and the correct account ID as the condition value.
  4. Under Then group costs together as, enter Team Alpha. This sets up our rule such that all expenses for Account 1 (account ID: 000000000001) get grouped under Team Alpha. Your rule should look like this:
  1. Choose Create rule.
  2. Repeat this process for Team Beta, as well as Team Gamma and Team Delta. Note that we group together Team Gamma and Team Delta since they share Account 3 in our org chart. So, the final rule hierarchy should be as follows:
  1. Choose Next, then Next again.
  2. In Step 3, you have the option to choose whether you want to apply these changes to up to a year’s worth of historical expenses. You can specify which month to begin this tracking under Lookback period.

You just created your first Cost Category to represent the different teams in the organization! Next, let’s create another category for Business Unit. We can use the same general procedure as before, with a few minor changes.

When creating the rule, you can use an existing Cost Category as the dimension for the rule. Thus, we can create a simple rule like the following to group costs for Team Alpha and Team Beta under Engineering:

Repeat this process for Marketing, and you’ve completed the second cost category. Here’s the final rule hierarchy for Business Unit:

At this point, we’ve recreated the entire org chart. However, we’d still like to know specific costs for Project A and Project B. We can do that by creating another cost category for Project.

Again, we can use the same procedure. This time, we’ll need to take advantage of cost allocation tags to separate resources within the same account into different projects. For instance, if a resource has a cost allocation tag with the value “ProjectA”, we can categorize it under project A. The rule here would look as follows:

However, that by itself wouldn’t be enough to account for tagged resources in both Engineering and Marketing accounts. So, we need a compound condition. Our rule needs the Account dimension, in addition to the Cost Allocation Tag dimension. We also need to repeat this rule creation for all involved accounts.

So here’s the full rule hierarchy considering both projects and both Engineering Account 1 and Marketing Account 3:

Up until this point, we haven’t yet considered shared costs. These are costs that might come from a separate shared account. Organizations must also consider these costs, but it can be tricky knowing how to allocate them to each business function or team.

To account for shared costs at the team level, we can edit our Team cost category using the following steps:

  1. From the Cost Categories dashboard, choose the Team cost category you created earlier. 
  2. Choose Edit cost category.
  3. Choose Add rule. What we want to do is create another rule that categorizes expenses from this shared account:
  1. Choose Create rule.
  2. Choose Next. This brings you to the Split your costs screen. Choose Add a split charge.
  3. For Source value, choose Shared Costs. This is the Cost Category Value you just created.
  4. For Target value, select Team Alpha, Team Beta, and Team Gamma and Team Delta.
  5. For Charge allocation method, choose Fixed.
  6. For the percentage weights, allocate the shared costs however you like. For illustration, we’ll assign 25% to Team Alpha, 25% to Team Beta, and 50% to Team Gamma and Team Delta:
  1. Choose Next, then choose Save changes.

Now, our cost totals will include any shared costs we’ve chosen to consider. We can do the same exact procedure with Projects to split costs from “shared-account” (account ID: 999999999999) equally across Project A and Project B.

At this point, it’s really easy for us to answer all three questions we set out to answer before this exercise!

How much is Engineering spending? That’s easy–just look at all costs under Engineering in the Business Function cost category.

How much is Team Alpha spending, considering shared costs? That’s also easy–just look at all costs under Team Alpha in the Team cost category. We’ve already edited this to account for shared costs.

What is the cost of running Project A, where multiple teams (i.e. Team Alpha, Team Gamma, and shared resources) contribute? Three easy questions in a row! Just look at all costs under Project A in the Project cost category. We’ve already edited this to account for shared costs.

How Do AWS Cost Categories Integrate with the CUR?

Importantly, AWS Cost Categories integrate seamlessly with the CUR. This is great for those of you already using the CUR for cost analysis. When you create a cost category, it shows up as a separate column in the CUR.

For instance, after creating the Team cost category, your CUR report will have a new column titled costCategory/Team. Its value will be the cost category value assigned according to your custom rules.

Here’s an example of part of a CUR entry you might come across:

AccountIDResource IdLineItemTypeUnblended CostcostCategory/Team
000000000001i-12345Usage50.05Team Alpha

This makes it easy to explore costs in Cost Explorer as well. You can simply apply a filter to the Team cost category, searching for a value of “Team Alpha”, and see just costs related to Team Alpha.

AWS Cost Categories vs. AWS Cost Allocation Tags: What are the Differences?

Before Cost Categories, cost allocation tags used to be the go-to feature for cost organization. Let’s do a quick breakdown of the differences between the two features.

Firstly, AWS Cost Categories provide advanced capabilities for creating filter rules with complex logic options. This allows you to model your cost organization after your actual org chart more precisely. Whether you’re segmenting costs by team, project, or business function, Cost Categories gives you the flexibility to set up detailed filters to support all use cases.

To be fair, you could do this with tags too. But on their own, tags get real messy. As your organization grows and more tags are added, it can become increasingly challenging to keep everything organized and consistent. This is where Cost Categories shine, as they allow you to centralize all your filter rules into one service.

One standout feature of Cost Categories is the ability to handle shared resources effectively. This is particularly useful when different teams or projects share infrastructure or tools, ensuring that each group is accurately billed for their portion of the shared expenses.

For any medium to large-sized organization, Cost Categories is definitely the way to go. However, it’s important to mention that you don’t have to choose one over the other in this debate. In fact, as we illustrated in our walkthrough, you can use tagging in conjunction with Cost Categories to split your costs more effectively.

So in conclusion, while Cost Categories offer more advanced capabilities, tags are still valuable and can be integrated into your cost category rules. Using both in tandem unleashes the full power of both features.

Conclusion

We’ve covered a lot of ground in this article, so let’s do a quick recap. AWS Cost Categories provide a powerful way to organize and manage your cloud expenses, especially for larger organizations.

Whether you’re trying to track how much a specific team is spending, or break down the project costs across an entire organization, AWS Cost Categories can help you get a clear and organized view of your expenses. This can make future budget allocation, forecasting, and optimization a whole lot easier.

So why wait? Set up AWS Cost Categories today and your finance team will surely thank you. Happy cost managing!

Author Alexander Yu
Alexander Yu is a technical writer at AWS by day and a freelance writer by night. After completing his BS in electrical engineering and computer science from UC Berkeley, he became a software developer at AWS for almost three years before transitioning into technical writing. He lives in Seattle with his dog Yuna.

Manage, track, and report your AWS spending in seconds — not hours

CloudForecast’s focused daily AWS cost monitoring reports to help busy engineering teams understand their AWS costs, rapidly respond to any overspends, and promote opportunities to save costs.

Monitor & Manage AWS Cost in Seconds — Not Hours

CloudForecast makes the tedious work of AWS cost monitoring less tedious.

AWS cost management is easy with CloudForecast

We would love to learn more about the problems you are facing around AWS cost. Connect with us directly and we’ll schedule a time to chat!

AWS daily cost reports