Adding tags to Amazon ECS resources
You can tag new or existing tasks, services, task definitions, or clusters. For information about tagging your container instances, see Adding tags to an Amazon ECS container instance.
Warning
Do not add personally identifiable information (PII) or other confidential or sensitive information in tags. Tags are accessible to many AWS services, including billing. Tags are not intended to be used for private or sensitive data.
You can use the following resources to specify tags when you create the resource.
Task |
Console |
AWS CLI |
API Action |
---|---|---|---|
Run one or more tasks. |
|||
Create a service. |
|||
Create a task set. |
|||
Register a task definition. |
Creating an Amazon ECS task definition using the console | ||
Create a cluster. |
|||
Run one or more container instances. |
You can add or delete tags that are associated with your clusters, services, tasks, and task definitions directly from the resource's page.
To modify a tag for an individual resource
Open the console at https://console.aws.amazon.com/ecs/v2
. -
From the navigation bar, select the AWS Region to use.
-
In the navigation pane, select a resource type (for example, Clusters).
-
Select the resource from the resource list, choose the Tags tab, and then choose Manage tags.
-
Configure your tags.
[Add a tag] Choose Add tag, and then do the following:
-
For Key, enter the key name.
-
For Value, enter the key value.
-
-
Choose Save.
You can add or overwrite one or more tags by using the AWS CLI or an API.
-
AWS CLI - tag-resource
-
API action - TagResource