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 Use Cost Allocation Tags in the AWS Billing and Cost Management User Guide.

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

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/v3/home.

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

  3. Choose the Tags tab.

  4. Choose Add or edit tags.

  5. On the Add or edit tags page, you can do the following:

    Add a tag

    Enter a key and, optionally, a value for the tag.

    Edit a tag

    Change the key, the value, or both. You can also delete the value for a tag, but the key is required.

    Delete a tag

    Choose the X on the right side of the value field.

  6. Choose Save.