AWS provides detailed billing reports and tools such as AWS Cost Explorer to analyze your costs. There are plenty of parameters to group by and filter, helping you to analyze your monthly AWS bill. However, what happens if you want to dig a little deeper? Maybe you want to assign costs to business units, products, services or specific customers. Say hello to cost allocation tags!
What are cost allocation tags?
AWS provides its own set of 44 cost allocation tags, and you can also use any of your own regular tags as cost allocation tags. However, cost allocation tags are inactive by default. Once activated, it will take up to 24 hours for them to be included in your next cost report. Cost allocation tags are not retro-active, they will only be applied to costs generated after the tag was activated.
Which tags should I use?
There is no one-size-fits-all answer to this question. However, it is crucial to unify your tags across all of your accounts and resources. Otherwise it will be impossible to assign costs properly.
I would start with analyzing how your organization is structured and which products and services you are running in the cloud. This would provide a handful of useful tags such as ProductName and BusinessUnit to start with. However, cost allocation tags are also used within feedback loops for cost optimization operations. You can be really creative with these, and gain useful insights once you dig deep enough.
Analyze your cost reports
Once your cost allocation tags are doing their work, head back to the AWS Cost Explorer. You should be able to group by and filter by the cost allocation tags you defined. You can also export your cost and usage report (CUR) to Athena and analyze your costs with queries.
- Open the AWS Billing console and select Cost allocation tags
- Search for the tags you want to enable and select them
- Click on Activate and confirm
- Allow up to 24 hours for these tags to show in the cost reports
- Using Cost Allocation Tags – AWS Billing. (n.d.). AWS Billing User Guide. Retrieved April 29, 2022, from https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html
- User-Defined Cost Allocation Tags – AWS Billing. (n.d.). AWS Billing User Guide. Retrieved April 29, 2022, from https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/custom-tags.html
- Activating User-Defined Cost Allocation Tags – AWS Billing. (n.d.). AWS Billing User Guide. Retrieved April 29, 2022, from https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/activating-tags.html
- Querying Cost and Usage Reports using Amazon Athena – AWS Cost and Usage Reports. (n.d.). AWS Cost and Usage Reports User Guide. Retrieved April 29, 2022, from https://docs.aws.amazon.com/cur/latest/userguide/cur-query-athena.html