Adding Cost Allocation Tags
DEPRECATED
This content is DEPRECATED. Please use Organizational Taxonomy Guide.
Last Updated
October 2024
Introduction
Now that you have your CID dashboards deployed, you may want to view or group some of the visuals by tags you’re using. Common use cases include seeing spend by application, identifying opportunity by cost category, or building charge-back mechanisms to business units.
If you have cost allocation tags or cost categories setup in your AWS account, you will see those tags in your CUR. They show up as their own column. You can confirm that these tags are present by going to Athena and expanding your CUR table. If you scroll down, you should find your tags and cost categories.
Prerequisites
For this solution you must have the following:
-
Access to your AWS Organizations and ability to tag resources
-
Enabled cost allocation tags in Cost Explorer.
Step by Step Guide
This guide assumes you have enabled one or more user or AWS tags and waited up to 24 hours for the tags to become available in the CUR data, and for Amazon QuickSight to refresh datasets.
Step 1. Modify Queries in Athena
You will need to modify several queries in Athena to add the tags. Queries that you can modify to enable tags are:
-
summary_view
-
hourly_view
-
resource_view
Follow instructions depending on the CUR version you use:
Step 2. Modify Data Set in Amazon QuickSight
Next the data set in Amazon QuickSight needs to be updated so that you can see the added fields to use them in your Dashboards and Analyses.
-
Navigate to Amazon QuickSight in the console.
-
Select Datasets on the left side of the page.
-
Locate summary_view in the list of datasets and click on the dataset.
-
Click on the EDIT DATASET button in the top right of the page.
-
Allow the fields and dataset preview windows to load.
-
Confirm that you can see the fields you’ve added in the list. This can be accomplished by entering the friendly name of the field in the search fields input.
-
Once you have confirmed you see all your fields, click the Save & Publish button in the top right of the dataset editor page.
-
A refresh of the dataset will be triggered. Monitor the status to confirm that it completed successfully.
-
Repeat the steps above on the hourly_view and resource_view datasets.
Note
Troubleshooting not seeing the tags If you do not see your custom fields, go back to Athena and confirm that the query view has run and updated successfully. Also make sure you are searching for the friendly name you gave the field in the Athena view.
Step 3. Modify QuickSight Analysis - CUDOS Dashboard
After the dataset has been updated you can now add those fields to different visualizations. Here we will demonstrate how you can update the CUDOS dashboard to use the tags you have added.
Note
Publishing over existing dashboard When you make changes, if you republish to the same dashboard and deploy a new version of the dashboard your changes will be overwritten.
Note
Deploying updates with --force
If you deploy an update to the CUDOS/CID dashboards with the
--force
option it will overwrite your Athena query view changes and
published dashboard changes
-
First we’ll need to save the dashboard as an analysis so we can make changes.
-
Open the CUDOS dashboard and select the save icon, selecting "save as" in the drop down selection to save the dashboard as an analysis.
-
Open the analysis.
-
Select the tab Executive: Billing Summary and click into a visual you wish to group by tag.
-
In the Data column on the left, search for the friendly name (
cost_center_tag
in this example) for one of the tags you added. -
Drag and Drop that field into the Group/Color for Bars area of the Visuals column. You can add it as a drill down layer, or replace the original field.
-
Repeat this customization for any additional visuals you wish to change.
Step 4. (Optional) Modify TAGsplorer sheet
The CUDOS dashboard has a sheet titled TAGsplorer which has visuals that are intended to sort data by a "primary" and "secondary" tag. These tags can be any two of the tags you would like to see in these visualizations. You must have updated your resource_view dataset to include tags using the above steps.
-
Select the Cost Per Primary TAG Previous Month visual.
-
In the Data column on the left, search for the friendly name of the tag you want to add as primary.
-
Drag and Drop that field into the Group/Color area of the Visuals column.
-
Select the Cost Per Secondary TAG Previous Month visual.
-
In the Data column on the left, search for the tag you want to add as secondary.
-
Drag and Drop that field into the Group/Color area of the Visuals column.
-
Save and publish your analysis.
Summary
We’ve shown you how you can customize your datasets, views and dashboards to have AWS and user tags that are enabled in Cost Explorer in your visualizations.