AWS EC2 Instance Tag Restrictions

AWS EC2 Instance Tag Restrictions

When creating an EC2 instance in AWS, the instance name is set as the value of the Name tag. The tag key (Name) and tag value must follow certain conventions.


The following basic restrictions apply to tags:Maximum number of tags per resource – 50


For each resource, each tag key must be unique, and each tag key can have only one value.


Maximum key length – 128 Unicode characters in UTF-8


Maximum value length – 256 Unicode characters in UTF-8


Allowed characters


Although EC2 allows for any character in its tags, other AWS services are more restrictive. The allowed characters across all AWS services are: letters (a-z, A-Z), numbers (0-9), and spaces representable in UTF-8, and the following characters: + - = . _ : / @.


If you enable instance tags in instance metadata, instance tag keys can only use letters (a-z, A-Z), numbers (0-9), and the following characters: + - = . , _ : @. Instance tag keys can't contain spaces or /, and can't comprise only . (one period), .. (two periods), or _index. For more information, see Work with instance tags in instance metadata.


Tag keys and values are case-sensitive.


The aws: prefix is reserved for AWS use. If a tag has a tag key with this prefix, then you can't edit or delete the tag's key or value. Tags with the aws: prefix do not count against your tags per resource limit.

    • Related Articles

    • AWS External ID change

      AWS External ID Change An External ID in AWS is a unique identifier used in cross-account access scenarios to ensure that a request from one account to another is intended. Here's an elaboration on the process and considerations for managing AWS ...
    • AWS EC2 Cost Report not showing data.

      Scenario: When accessing the AWS EC2 Cost report, users may encounter situations where the report appears empty, despite the presence of EC2 instances in the Cloud. In some cases, users may encounter issues with AWS EC2 cost reports, specifically ...
    • Purchased RI Unavailable in Optimize Rate page

      What to do if your purchased reservations in the cloud platform are not available in the optimize rate page in CoreStack: 1. Check the Cloud Provider and Currency: Ensure the correct cloud provider and currency are selected in the UI. The page ...
    • What to do when cost data is not available for a particular month for an AWS Account

      Scenario : Cost data is not available for a particular month for an AWS Account. Solution : We need to check whether the billing file for that particular month is available in the S3 bucket. This step is crucial because if the billing file is not ...
    • Required Permissions for GCP SQL and BigQuery Resource Tagging Governance

      Required Permissions for GCP SQL and BigQuery Resource Tagging Governance SQL Resources: To enable tagging for SQL resources in Google Cloud Platform (GCP), such as Cloud SQL instances, the following permissions and configurations are required: Cloud ...