Add a tag to a project - Amazon CodeBuild
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Add a tag to a project

Adding tags to a project can help you identify and organize your Amazon resources and manage access to them. First, you add one or more tags (key-value pairs) to a project. Keep in mind that there are limits on the number of tags you can have on a project. There are restrictions on the characters you can use in the key and value fields. For more information, see Tags. After you have tags, you can create IAM policies to manage access to the project based on these tags. You can use the CodeBuild console or the Amazon CLI to add tags to a project.

Important

Before you add a tag to a project, make sure to review any IAM policies that might use tags to control access to resources such as build projects. For examples of tag-based access policies, see Using tags to control access to Amazon CodeBuild resources.

For more information about adding tags to a project when you create it, see Add a tag to a project (console).

Add a tag to a project (console)

You can use the CodeBuild console to add one or more tags to a CodeBuild project.

  1. Open the CodeBuild console at https://console.amazonaws.cn/codebuild/.

  2. In Build projects, choose the name of the project where you want to add tags.

  3. In the navigation pane, choose Settings. Choose Build project tags.

  4. If no tags have been added to the project, choose Add tag. Otherwise, choose Edit, and then choose Add tag.

  5. In Key, enter a name for the tag. You can add an optional value for the tag in Value.

  6. (Optional) To add another tag, choose Add tag again.

  7. When you have finished adding tags, choose Submit.

Add a tag to a project (Amazon CLI)

To add a tag to a project when you create it, see Create a build project (Amazon CLI). In create-project.json, add your tags.

In these steps, we assume that you have already installed a recent version of the Amazon CLI or updated to the current version. For more information, see Installing the Amazon Command Line Interface.

If successful, this command returns nothing.