As cloud cost allocation becomes mainstream, there are two distinct models that have emerged: tag-based and resource-based cost allocation. While both models have the potential to meet the needs of an organization, the differences warrant a deeper understanding in order to select the right solution for you. This article will explore the two different approaches, and outline the relative advantages and disadvantages of tag versus resource-based cloud cost allocation.
About cloud cost allocation
Most organizations will have several different ways they want to report their costs. These perspectives will likely change over time and vary by stakeholder. For example, finance may want a monthly breakdown of costs by product line or shared environment, operations may need a cost breakdown by project or team, and engineering may want a cost breakdown by application role.
While cost allocation of IT infrastructure has been a common and well-understood practice for decades, its application to the cloud has been challenging due to the dynamic infrastructure, delegation of control, consumption-based pricing, and increased scale of resources being managed.
What are tags?
Tagging was introduced by Amazon in 2010 as a way for customers to label AWS resources for organizational purposes. Using tagging, a customer might assign labels for categories such as department (e.g. marketing), product, environment (e.g. production), application (e.g. HRIS), customer, or application role (e.g. Cassandra). Once a resource is tagged, Amazon ensures usage associated with this resource is reported by this tag, allowing customers to more easily associate costs to different business perspectives.
Since the introduction of tags, Amazon has continued to expand its support for additional resources and has added some higher-level features that take advantage of tags (e.g you can use tags to filter views in Cost Explorer). Tags can be created and applied using Tag Editor, the AWS Management Console, or the AWS CLI, and while tagging is almost always a core building block in any cost allocation solution, there are some limitations you should be aware of. These include:
- Tagging isn't available on all resources. While the availability of tag support across Amazon resources has increased over the years, there are still some resources that are not taggable and some that support tagging, but not when the resource is created. Amazon has produced a list of supported resources, but recommends customers read the resource documentation before trying to apply tags for the first time.
- Tags are case-sensitive. Case sensitivity can create a number of issues if there's no global tagging policy in place. For example, the tag "Costcenter" could be assigned as "costcenter" and "CostCenter". The enforcement of a global tagging strategy is particularly important in multicloud environments where tagging conventions may differ by Cloud Service Providers. See our article here for multicloud tagging best practices.
- There are character restrictions on some resources, but not on others. For Amazon EC2, you can use any character type, but other services are more restrictive. Bearing in mind the point raised above about enforcing a global tagging strategy, the allowed characters across AWS services are letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @
- Tagging isn't retroactive. When you tag an AWS resource (e.g. an instance), all usage related to this resource is permanently marked with your user-defined tags. For example, if you turn an instance on but don't tag it until a month later, all prior usage associated with that resource will remain untagged.
Two approaches to cloud cost allocation
Despite their limitations, tags are almost certainly going to be a core building block in any successful cloud cost allocation strategy. So the question isn't whether to tag your resources (you should), but whether your allocation of costs should be driven by tags or resources.
Tag-based cost allocation involves analyzing Billing and Cost Management reports to associate costs with specific categories (e.g. department). By adding up all charges for a particular tag, you can report the allocation of costs for all unique values for that tag (e.g. marketing, sales, engineering, IT). Tag-based cloud cost allocation has the advantage of being quick and easy—but has the disadvantage of being less precise.
Resource-based cost allocation involves defining rules by partitioning your resources into business groups. These rules can utilize, but are not limited to tags, and are automatically applied as new resources are launched and existing resources shutdown. To perform a cloud cost allocation analysis by resources, you need to associate charges in the Amazon Cost and Usage Report to resources, and then assign charges based on the membership of those resources in specific business groups. This approach has the advantage of being precise and able to compensate for the limitations of tags—but the disadvantage of being much more complex to perform the analysis.
Resource-based cost allocation has a long history in corporate IT, where asset management systems are utilized to track the lifecycle of physical resources in support of reporting on their depreciating costs.
Which is right for you?
If you're looking for a quick and easy way to get a directionally correct sense of your allocation of costs, a tag-based approach is a great way to start. A good tool for tag-based cost allocation is the Amazon Cost Explorer, which is available for free from the AWS Console. This solution may also be sufficient for organizations running a relatively static infrastructure with limited needs for cost reporting, or those that have infrastructure they change infrequently.
For organizations that are larger, have infrastructure that changes more frequently, need to support compliance requirements, or have a need for more detailed cost reporting, a resource-based solution like CloudHealth is often essential.
If you’d like to learn more about tagging best practices, resource-based cloud cost analysis, and how it all fits into a broader cloud financial management practice, see our whitepaper: Building a Successful Cloud Financial Management Practice.