AWS Knowledge

How to Use AWS Cost Allocation Tags to Optimize Your Cloud Spend

Guillermo Ojeda

Feb 8, 2023

    Table of contents will appear here.
    Table of contents will appear here.
    Table of contents will appear here.

What are AWS Cost Allocation Tags

AWS Cost Allocation Tags are key-value pairs that can be attached to your AWS resources to categorize them in different ways, such as by purpose, owner, or environment. Tags can help you organize your resources and manage costs, identify cost owners, and track costs across different projects and departments.

A tag consists of a case-sensitive key and a value. For example, you might have a key called "Project" and the value might be "Customer Support". By associating this tag with different resources, you can later identify the costs for all resources that are tagged as part of the "Customer Support" project.

Types of Cost Allocation Tags

There are two types of Cost Allocation Tags: AWS-generated tags and user-defined tags. AWS-generated tags are created automatically by AWS services. An example of an AWS-generated tag is "aws:createdBy", which identifies the AWS service that created the resource.

User-defined tags are created by users who manually add them to the resources. They're typically used for linking real-world concepts such as Project or Cost Center to cloud resources such as EC2 instances.

AWS-generated tags are most commonly used for internal auditing and security reviews. Cost management is usually better done by adding the correct user-defined tags, which should be relevant to your business and cost structures.

Benefits of Using Cost Allocation Tags

Using AWS Cost Allocation Tags comes with several benefits:

  1. Improved Cost Visibility: By tagging your resources, you gain a more granular view of your AWS costs. You can view the AWS Cost and Usage report or the AWS Cost Explorer to understand the cost associated with each tag, enabling you to pinpoint exactly where your expenses are going.

  1. Cost Management: Cost Allocation Tags allow you to allocate costs to different teams, projects, or cost centers. This enables you to attribute costs accurately, which is particularly useful in large organizations with many internal stakeholders.

  1. Resource Optimization: By tagging resources, you can identify underutilized resources. For example, an EC2 instance with no tags could be an orphaned resource, potentially leading to unnecessary costs. By tagging resources and monitoring their usage, you can optimize resource utilization and reduce costs.

  1. Simplified Billing: Cost Allocation Tags can simplify the process of chargebacks and showbacks in organizations. For example, if you have different departments using AWS resources, you can assign a unique tag to each department. When the AWS bill comes, you can easily see how much each department owes.

Setting Up AWS Cost Allocation Tags

Here is a step-by-step guide to setting up AWS Cost Allocation Tags:

Step 1: Activate Cost Allocation Tags

First you'll need to activate cost allocation tags. Here's how to do it:

  1. Log into your AWS Management Console.

  2. Navigate to the "Billing and Cost Management Dashboard."

  3. In the left-hand menu, click on "Cost allocation tags."

  4. Here, you will find two sections: "AWS-generated cost allocation tags" and "User-defined cost allocation tags." Check both.

  5. Click on "Activate" at the top of each section.

Step 2: Assign Your Tags to AWS Resources

The final step is to assign the tags you created to your AWS resources:

  1. Navigate to the AWS resource you wish to tag.

  2. Select the resource and choose "Tags" from the navigation pane.

  3. Click "Add/Edit Tags."

  4. In the "Tag key" dropdown, select the Key of the tag you wish to assign.

  5. In the "Tag value" field, enter the Value of the tag you wish to assign.

  6. Click "Save."

By following these steps, you can effectively set up and assign cost allocation tags to your AWS resources. It's important to remember that to leverage these tags in understanding your AWS costs, you must first activate them in the Billing and Cost Management Dashboard. Only then will AWS begin including cost allocation tags in your cost and usage reports.

Keep in mind that, while AWS-generated tags are applied automatically to resources, user-defined tags are not retroactively applied. You must manually apply these to each of your AWS resources.

Monitoring Cloud Spend with Cost Allocation Tags

Once you have your cost allocation tags set up, it's important to utilize them effectively to monitor your cloud spend. This can help you identify which resources are incurring the most costs and where there might be potential for savings. Here are the detailed steps on how to do this:

Step 1: Generate a Cost and Usage Report

The first step in monitoring your cloud spend is generating a Cost and Usage Report. This report provides comprehensive data about your AWS costs, including costs broken down by the tags you have set up.

  1. Navigate to the "Billing and Cost Management Dashboard."

  2. Select "Cost and Usage Reports" from the sidebar.

  3. Click on "Create new report."

  4. Fill in the required fields, such as the report name.

  5. In the "Data options" section, check the box for "Include resource IDs" to ensure your report includes details about individual resources.

  6. Click on "Next."

Step 2: Enable Tag Inclusion in Reports

To have your tags included in the report:

  1. In the "Schema" section of the Cost and Usage Report setup, find "Include these tags."

  2. Check the boxes for the tags you want to include in the report.

  3. Click on "Next."

Step 3: Configure Report Delivery

You can choose to have your report delivered to an Amazon S3 bucket:

  1. Enter the name of your S3 bucket or create a new one.

  2. Set up permissions by choosing "Configure permissions" and then "Create a new policy."

  3. Review your settings and click on "Review and Complete."

Step 4: Analyze Your Report

Now, you can navigate to the S3 bucket you chose and open the report. You will see your AWS costs broken down by the tags you set up, allowing you to see exactly how much you're spending on different projects, teams, or whatever else you've chosen to track with your tags.

To make things even easier, you can import this data into Amazon Athena or Amazon QuickSight, where you can visualize and analyze it in a more user-friendly format. This will help you keep a close eye on your spending and identify any potential areas for cost savings.

Cost Allocation Tags Best Practices

The following Best Practices will improve the way you manage your cloud costs:

  1. Implement a Tagging Strategy: Before you start tagging resources, you should establish a tagging strategy. Identify the information that will be most useful in managing costs (like environment, project, owner), and create a consistent set of tag keys for these.

  1. Consistent Tagging: Consistency in tagging is key to obtaining reliable cost data. Make sure you use the same case, spelling, and format for all instances of a tag. Any inconsistencies can lead to skewed cost data.

  1. Automate Tagging: You can automate the tagging of your resources using AWS services like AWS Lambda or AWS Resource Groups Tagging API. Automated tagging ensures that all new resources are tagged correctly and consistently.

  1. Use AWS Cost Explorer: Cost Explorer helps you analyze your costs on a granular level, and it supports filtering and grouping based on cost allocation tags. [Understand how to use AWS Cost Explorer](link to the Cost Explorer article).

  1. Enforce the Tagging Strategy with SCPs: If your AWS account is part of an AWS Organization, you can define Service Control Policies (SCPs) to enforce the usage of certain cost allocation tags, by only allow the creation of AWS resources if they contain those tags. This can help enforce your defined tagging strategy.

  1. Regular Review: Regularly review your tags and update them if necessary. This ensures that your tags reflect the current state of your resources.


AWS Cost Allocation Tags offer a powerful and flexible way to manage your AWS costs. By implementing a consistent and detailed tagging strategy, you can gain greater visibility into your costs, allocate costs accurately, optimize resource utilization, and simplify your billing process. As with any other tool, the effectiveness of Cost Allocation Tags depends on how you use them. Following best practices can ensure you get the most out of this powerful cost management tool.

1550 Mission Street, San Francisco, CA 94103

Made with

in San Francisco, CA

© All rights reserved. Pump Billing, Inc.

1550 Mission Street, San Francisco, CA 94103

Made with

in San Francisco, CA

© All rights reserved. Pump Billing, Inc.

1550 Mission Street, San Francisco, CA 94103

Made with

in San Francisco, CA

© All rights reserved. Pump Billing, Inc.