Tagging Amazon CloudFront distributions - Amazon CloudFront

Tagging Amazon CloudFront distributions

Tags are words or phrases that you can use to identify and organize your AWS resources. You can add multiple tags to each resource, and each tag includes a key and a value that you define. For example, the key might be "domain" and the value might be "example.com". You can search and filter your resources based on the tags you add.

The following are two examples of how it can be useful to work with tags in CloudFront:

  • Use tags to track billing information in different categories. When you apply tags to CloudFront distributions or other AWS resources (such as Amazon EC2 instances or Amazon S3 buckets) and activate the tags, AWS generates a cost allocation report as a comma-separated value (CSV file) with your usage and costs aggregated by your active tags. You can apply tags that represent business categories (such as cost centers, application names, or owners) to organize your costs across multiple services. For more information about using tags for cost allocation, see Using Cost Allocation Tags in the AWS Billing User Guide.

  • Use tags to enforce tag-based permissions on CloudFront distributions. For more information, see ABAC with CloudFront.

Note the following:

  • You can tag distributions, but you can't tag origin access identities or invalidations.

  • Tag Editor and Resource groups are currently not supported for CloudFront.

For the current maximum number of tags that you can add to a distribution, see Quotas. To request a higher quota (formerly known as limit), create a case with the AWS Support Center.

You can also apply tags to resources by using the CloudFront API, AWS CLI, SDKs, and AWS Tools for Windows PowerShell. For more information, see the following documentation:

Tag restrictions

The following basic restrictions apply to tags:

  • Maximum number of tags per resource – 50

  • Maximum key length – 128 Unicode characters

  • Maximum value length – 256 Unicode characters

  • Valid values for key and value – a-z, A-Z, 0-9, space, and the following characters: _ . : / = + - and @

  • Tag keys and values are case sensitive

  • Don't use aws: as a prefix for keys; it's reserved for AWS use

Adding, editing, and deleting tags for distributions

The following procedure explains how to add, edit, and delete tags for your distributions in the CloudFront console.

To add tags, edit, or delete tags for a distribution
  1. Sign in to the AWS Management Console and open the CloudFront console at https://console.aws.amazon.com/cloudfront/v4/home.

  2. Choose the ID for the distribution that you want to update.

  3. Choose the Tags tab.

  4. Choose Manage tags.

  5. On the Manage tags page, you can do the following:

    • To add a tag, type a key and, optionally, a value for the tag. Choose the Add new tag button to add more tags.

    • To edit a tag, change the tag’s key or its value, or both. You can delete the value for a tag, but the key is required.

    • To delete a tag, choose the Remove button next to the tag.

  6. Choose Save changes.