

# Tagging


A tag is a custom attribute label that you or AWS assigns to an AWS resource. Each AWS tag has two parts:
+ A tag key (for example, `companyname`, `costcenter`, `environment`, `project`, or `secret`). Tag keys are case sensitive.
+ An optional field known as a tag value. Omitting the tag value is the same as using an empty string. Like tag keys, tag values are case sensitive.

Together these are known as key-value pairs.

In the AWS DeepRacer service, you can assign tags to cars, RL models, and community races leaderboards. Tag these and other AWS resources that support tagging to indicate that the resources are related. In addition to identifying and organizing your models and leaderboards with tags, you can also use tags to track cost allocation and in IAM policies to help control who can view and interact with your resources. Use the AWS DeepRacer console or the AWS CLI to add, manage, and remove tags.

 For more information about using tags, see the [Tagging best practices](https://d1.awsstatic.com/whitepapers/aws-tagging-best-practices.pdf) whitepaper.

**Tag to Track Cost Allocation**  
AWS Cost Explorer and Cost and Usage Report support the ability to break down AWS costs by tag. Business tags such as `cost center`, `businessunit`, or `project` can be used to associate AWS costs with an organization’s typical financial reporting categories. However, a cost allocation report can include any tag allowing you to easily associate costs with technical or security categories, such as specific applications, environments, or compliance programs. Only a management account in an organization and single accounts that aren't members of an organization have access to the Cost Allocation Tags manager in the Billing and Cost Management console. For more information on using tags to track cost allocation see [User-Defined Cost Allocation Tags](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/custom-tags.html).

**Tag to Manage Access**  
You can also tag IAM users and roles to manage access to your models and community races leaderboards. To learn how to tag IAM users and roles, see [Tagging IAM users and roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html). To view a tutorial for creating and testing a policy that allows IAM roles with principal tags to access resources with matching tags, see [ IAM Tutorial: Define permissions to access AWS resources based on tags](https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html). For more information on using tags to control access to your AWS resources that support tagging see [Controlling access to AWS resources using resource tags](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html#access_tags_control-requests). 

**Topics**
+ [

# Add, view, and edit tags for a new resource
](tags-new.md)
+ [

# Add, view, and edit tags for an existing resource
](tags-exisiting.md)

# Add, view, and edit tags for a new resource


Adding tags to a new car, RL model, or community races leaderboard can help you identify, organize, track cost allocation, and manage access to these resources. Add one or more tags (key-value pairs) to a model or leaderboard. For each resource, each tag key must be unique, and each tag key can have only one value, but one resource may have up to 50 tags.

Create and apply the tags one resource at a time in the AWS DeepRacer console or use the [Tag Editor](https://docs.aws.amazon.com/ARG/latest/userguide/tag-editor.html) to add, edit, or delete multiple resources at once.

**Important**  
Editing tags for an RL model or community races leaderboard can impact access to those resources. Before you edit the name (key) or value of a tag, make sure to review any IAM policies that might use the key or value for a tag to control access to those resources.

**To add, view, and edit tags for a new RL model**  
Use the AWS DeepRacer console to add, view, and edit tags to a new RL model.

1. In **Your models**, choose **Create model**.

1. On the **Create model** page, after filling out the **Training details**, expand the **Tags** heading.

1. Under the **Tags** heading, choose **Add new tag**.

1. In **Key**, enter a name for the tag. You can add an optional value for the tag in **Value**. For more information about naming tags, see the Best Practices for Naming Tags and Resources topic in the [Tagging best practices](https://d1.awsstatic.com/whitepapers/aws-tagging-best-practices.pdf) whitepaper.

1. (Optional) To add another tag, choose **Add new tag** again.

1. (Optional) To remove an individual key or value, select the **X** next to it.

1. (Optional) To remove a key-value pair, choose **Remove**.

1. When you have finished adding tags, choose a track under **Environment simulation** and select **Next**.

After tagging and submitting a new model for training, you can manage its tags during or after training and evaluation under the **Tags** heading at the bottom of the page.

1. Choose **Manage tags**.

1. In the **Manage tags** pop up box, you can remove a tag you have created by selecting the **Remove** button next to the tag you want to remove or choose **Add a new tag** to add a new tag.

1. If you choose to add a new tag, in **Key**, enter a name for the tag. You can add an optional value for the tag in **Value**. For more information about naming tags, see the Best Practices for Naming Tags and Resources topic in the [Tagging best practices](https://d1.awsstatic.com/whitepapers/aws-tagging-best-practices.pdf) whitepaper.

1. When you have finished removing and adding tags, choose **Submit**.

**To add, view, and edit Tags for a new community races leaderboard**  
Use the AWS DeepRacer console to add, view, and edit tags to a new community races leaderboard.

1. In **Community races**, choose **Create race**.

1. On the **Race details** page, expand the **Tags** heading.

1. Under the **Tags** heading, choose **Add new tag**.

1. In **Key**, enter a name for the tag. You can add an optional value for the tag in **Value**. For more information about naming tags, see the Best Practices for Naming Tags and Resources topic in the [Tagging best practices](https://d1.awsstatic.com/whitepapers/aws-tagging-best-practices.pdf) whitepaper.

1. (Optional) To add another tag, choose **Add new tag** again.

1. (Optional) To remove an individual key or value, select the **X** next to it.

1. (Optional) To remove a key-value pair, choose **Remove**.

1. When you have finished adding tags, choose a track under **Environment simulation** and select **Next**.

# Add, view, and edit tags for an existing resource


Adding tags to an existing AWS DeepRacer RL model or community races leaderboard can help you identify, organize, track cost allocation, and manage access to these resources. Add one or more tags (key-value pairs) to a model or leaderboard. For each resource, each tag key must be unique, and each tag key can have only one value, but one resource may have up to 50 tags.

Create and apply the tags one resource at a time in the AWS DeepRacer console or use the [Tag Editor](https://docs.aws.amazon.com/ARG/latest/userguide/tag-editor.html) to add, edit, or delete multiple resources at once.

**Important**  
Editing tags for an RL model or community races leaderboard can impact access to those resources. Before you edit the name (key) or value of a tag, make sure to review any IAM policies that might use the key or value for a tag to control access to those resources.

**To add, view, and edit tags for an existing RL model**  
You can use the AWS DeepRacer console to add, view, or edit tags for an existing RL model.

1. In **Your models**, select a model from the list by choosing its name.

1. Select **Actions**.

1. Choose **Manage tags** from the drop down list.

1. In the **Manage tags** pop up box, you can view, add, or remove a tags:

   1. To add a tag, choose **Add new tag**. In **Key**, enter a name for the tag. You can add an optional value for the tag in **Value**. For more information about naming tags, see the Best Practices for Naming Tags and Resources topic in the [Tagging best practices](https://d1.awsstatic.com/whitepapers/aws-tagging-best-practices.pdf) whitepaper.

   1. To add another tag, choose **Add new tag** again.

   1. To remove an individual key or value, select the **X** next to it.

   1. To remove a key-value pair, choose **Remove**.

1. When you have finished viewing, adding, and removing tags, choose **Submit**.

**To add, view, and edit tags for an existing community races leaderboard**

1. In **Community races**, choose **Manage races**.

1. On the **Manage races** page, select a race.

1. Select **Actions**.

1. Choose **Manage tags** from the drop down list.

1. In the **Manage tags** pop up box, you can view, add, or remove a tags:

   1. To add a tag, choose **Add new tag**. In **Key**, enter a name for the tag. You can add an optional value for the tag in **Value**. For more information about naming tags, see the Best Practices for Naming Tags and Resources topic in the [Tagging best practices](https://d1.awsstatic.com/whitepapers/aws-tagging-best-practices.pdf) whitepaper.

   1. To add another tag, choose **Add new tag** again.

   1. To remove an individual key or value, select the **X** next to it.

   1. To remove a key-value pair, choose **Remove**.

1. When you have finished viewing, adding, and removing tags, choose **Submit**.