Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 2. Using tags to manage cost data
Learn how tags work in cost management and how you can use them to best organize and view your resources to manage your costs.
2.1. Enabling and creating a tag mapping
Tag mapping is when you combine multiple tags across your cloud integrations. Tag mapping enables you to group and filter similar tags with one tag key.
To map a tag, you must first enable it. Cost management has a limit of 200 tags that you can enable. Complete the following steps:
- In cost management, click Settings.
- Click the header tab, Tags and labels.
- Click the drop-down menu, Enable tags and labels.
- Select the tags that you want to enable. Clear a tag to disable it.
- Next, click the Map tags and labels drop-down menu and click Create a tag mapping.
- In the wizard that opens, select the tags that you want to make child tags. Then click Next.
- Select one tag that you want to be the parent tag. This action will map the parent tag to the children tags that you selected in the previous step. Click Next.
- Review your selections and click Create tag mapping.
2.1.1. Troubleshooting duplicate keys
For every resource, each tag key must be unique and have only one value. However, when you map tags, you can unintentionally create scenarios that violate this rule and create multiple values.
Ordinarily, having more than one value would duplicate your costs. However, to avoid duplication, cost management prioritizes one key’s value. To understand how cost management prioritizes values and plan accordingly, see Section 1.3, “Understanding value precedence in tags”.
2.1.1.1. Troubleshooting example
Consider the following example where you are running an EC2 instance on AWS. You tagged this instance with the following key > value pairs:
-
app
>cost-management
-
App
>Insights
In cost management, you mapped app
to App
. Therefore, the same EC2 instance has the following key > value pairs:
-
App
>cost-management
-
App
>Insights
In this situation, cost management prioritizes the pre-existing value of the key App
> Insights
. Cost management also removes the association of the key app
and its value cost-management
from the AWS resource to prevent duplicate costs. App=cost-management
is added to the App=insight
cost.
Because App
is set as the parent key, cost management prioritizes its value over the value of app
in the tag mapping. Therefore, you should consider your tag mapping strategy before you set parent tags.
To troubleshoot issues with duplicate keys, ensure that your tag keys are unique and have only one value. Alternatively, to learn how to prioritize your keys, see Section 1.3, “Understanding value precedence in tags”.