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.
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.
Note the following:
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:
CloudFront API – See Actions on Tags in the Amazon CloudFront API Reference
AWS CLI – See cloudfront in the AWS Command Line Interface Reference
SDKs – See the applicable SDK documentation on the AWS Documentation page
The following basic restrictions apply to tags:
Maximum number of tags per resource – 10
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
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
Sign in to the AWS Management Console and open the CloudFront console at https://console.aws.amazon.com/cloudfront/.
Choose the ID for the distribution that you want to update.
Choose the Tags tab.
Choose Add or edit tags.
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.