The AWS Cloud Financial Management Framework runs on four pillars: ee, Save, Plan and Run. AWS Cost Categories are a fundamental aspect of that framework. With AWS Cost Categories, you can break down costs and associate them with specific business units or service areas.
In this article, we will review AWS Cost Category in-depth, including the key terminology and conceptual knowledge required to use Cost Categories effectively. We will also explain how meta-data such as tags are used in Cost Categories. Then, we will walk through setting up cost categories so you can get hands-on with this powerful AWS cost management tool.
AWS Cost Categories is an AWS feature that allows users to allocate cost and usage data to specific business units.
By enabling you to construct your cost allocation data, Cost Categories complements other AWS Cost Management suite features, such as Cost Explorer, Cost Budgets, and Cost Anomaly detection. To understand how AWS Cost Categories work, let’s take a deeper dive.
Different organizations have different structures for allocating costs, such as teams, applications, and projects. AWS Cost Categories enable us to group tags, accounts, services, and charge types using our organization’s preferred method.
For example, suppose you have three applications that together offer one service. You can use AWS Cost Categories for these applications to charge your service rather than setting up a separate tag for each application. You could also group different environments, including production, testing, or staging for a single application. This additional layer of abstraction allows us to optimize the granularity of our cost allocation.
You can define custom groups based on the dimensions such as account, tags, cost category, and multilevel hierarchical relationships among your cost categories to replicate your organizational structure. For example:
There are several different features associated with creating and managing AWS Cost Categories. Creating a cost category in the AWS Management Console includes Cost Category Name and Rule Types. Additionally, managing AWS Cost Categories requires knowledge of dimensions, operations, quotas. Below, we’ll take a closer look at each of these essential concepts.
Cost Category Name is, as the name implies, simply a name for a given cost category. Example Cost Category Names:
Rule Types specify which cost category values should be used to categorize costs. You can define rules based on dimensions called a regular rule. You can also define rules dynamically based on dimension value. Since it inherits rules based on dimension value, this type of rule is known as an inherited rule.
Cost Category Values are associated with Cost Category Names.
Dimensions create rules within your cost category. You can think of dimensions as filters for specifying rules. Currently, there are five types of billing dimensions that are supported. These are:
AWS Cost Category Dimensions example:
Cost Category Name: Team
Dimensions: Account and Tag
Values: Region 1 and Region 2
Operations are analogous to boolean expressions such as AND, OR, NOT, or regular expressions. The main difference is in the syntax. Supported operations in Cost Categories are:
Operations | Type of Match | Description |
---|---|---|
Is | Exact Match | Filters out the exact match |
Is not | Exact Match | Filters out the same match that is not specified |
Is absent | Exact Match | It excludes the tag key that matches this value. |
Contains | Approximate Match | Filters for a text string containing this value. |
Starts with | Approximate Match | Filters for a text string that has the specified start value |
Ends with | Approximate Match | Filters for a text string that has the specified start value |
We need to keep specific quotas and limitations in mind while creating AWS Cost Category. The following table describes quotas, naming conventions, and restrictions for the AWS Cost Categories :
Field | Quota Limit |
---|---|
Total number of AWS Cost Categories per management account | 50 |
Total number of cost category rules for a cost category (API) | 500 |
Naming convention | Names must be unique, and they are case sensitive |
The number of split charge rules for a cost category | 10 |
Densify offers the industry’s most automated and accurate recommendations for sizing cloud resources, including VMs, containers, databases, and auto scaling groups.
Densify has partnered with Intel to offer one year of free resource optimization software licensing to qualified companies.
In many cases, multiple teams use the same AWS resources. When that occurs, it creates additional work and complexity for FinOps departments. The Split Charges feature of AWS Cost Categories helps solve this problem. By splitting charges, organizations can allocate charges between multiple cost category values.
Refer to AWS’s splitting charges within cost categories documentation for a deeper dive into getting the most out of splitting charges.
Now that you know all the elements and fundamental concepts behind AWS Cost Categories let’s get hands-on experience in the AWS Management Console!
There are two ways to define your Cost Categories in AWS Billing and Cost Management Console – the JSON Editor or the GUI-based Rule Builder.
You can write complex rules with nested conditions and use additional logical operators such as NOT and OR using the JSON Editor. The following is the syntax used as a JSON script to define the Cost Category.
{
"DefaultValue": "string",
"Name": "string",
"Rules": [
{
"InheritedValue": {
"DimensionKey": "string",
"DimensionName": "string"
},
"Rule": {
"And": [
"Expression"
],
"CostCategories": {
"Key": "string",
"MatchOptions": [ "string" ],
"Values": [ "string" ]
},
"Dimensions": {
"Key": "string",
"MatchOptions": [ "string" ],
"Values": [ "string" ]
},
"Not": "Expression",
"Or": [
"Expression"
],
"Tags": {
"Key": "string",
"MatchOptions": [ "string" ],
"Values": [ "string" ]
}
},
"Type": "string",
"Value": "string"
}
],
"RuleVersion": "string",
"SplitChargeRules": [
{
"Method": "string",
"Parameters": [
{
"Type": "string",
"Values": [ "string" ]
}
],
"Source": "string",
"Targets": [ "string" ]
}
]
}
JSON Syntax to Create Cost Category (Source)
To use the GUI Builder, sign in to your AWS Management Console, then follow these steps:
We have discussed how to Create AWS Cost Category via two different options. Using the AWS documentation below, you can learn more on how to :
Then, you can move on to a critical aspect of cost management: usage monitoring. After categorizing your data with AWS Cost Categories, you can view your cost allocation breakdowns and your non-categorized costs.
For example, in the image below, we can see costs for separate teams, shared costs, and total costs.
For more on cost analysis and visualization, check out the official AWS blog on visualizing costs with Athena and Quicksight.
AWS Cost Categories are a vital aspect of cloud financial management in the AWS cloud. However, it isn’t the only aspect. To master the AWS FinOps and cost management, you also need knowledge of AWS Budgets, AWS Cost Explorer, and other AWS Billing tools. You can get started learning more about those AWS billing tools for free here.
Densify offers the industry’s most automated and accurate recommendations for sizing cloud resources, including VMs, containers, databases, and auto scaling groups.
Densify has partnered with Intel to offer one year of free resource optimization software licensing to qualified companies.