Tagging managed nodes
The topics in this section describe how to work with tags on managed nodes.
A managed node is any machine configured for AWS Systems Manager. This includes Amazon Elastic Compute Cloud (Amazon EC2) instances, edge devices, and on-premises servers or virtual machines (VMs) in a hybrid environment that are configured for Systems Manager.
The instructions in this topic are applicable to any machine that is managed using Systems Manager.
Topics
Creating or activating managed nodes with tags
You can add tags to EC2 instances at the time you create them. You can add tags to on-premises servers and virtual machines (VMs) at the time you activate them.
For information, see the following topics:
-
For EC2 instances, see Tag your Amazon EC2 resources in the Amazon EC2 User Guide for Linux Instances. (Content applies to both EC2 instances for Linux and for Windows)
-
For on-premises servers and VMs, see Create a managed-node activation for a hybrid environment.
Adding tags to existing managed nodes
You can add tags to managed nodes by using the Systems Manager console or the command line.
Topics
Adding tags to an existing managed node (console)
Open the AWS Systems Manager console at https://console.aws.amazon.com/systems-manager/
. In the navigation pane, choose Fleet Manager.
-or-
If the AWS Systems Manager home page opens first, choose the menu icon (
) to open the navigation pane, and then choose Fleet Manager in the navigation pane.
-
Choose the ID of the managed node to add tags to, and then choose the Tags tab.
Note If a managed node you expect to see isn't listed, see Troubleshooting managed node availability for troubleshooting tips.
-
In the Tags section, choose Edit, and then add one or more key-value tag pairs.
-
Choose Save.
Adding tags to an existing managed node (command line)
To add tags to an existing managed node (command line)
-
Using your preferred command line tool, run the following command to view the list of managed nodes that you can tag.
Note the ID of a managed node that you want to tag.
Note Machines that have been registered for use with Systems Manager in a hybrid environment begin with
mi-
, such asmi-0471e04240EXAMPLE
. EC2 instances have IDs that begin withi-
, such asi-02573cafcfEXAMPLE
. -
Run the following command to tag a managed node. Replace each
example resource placeholder
with your own information.If successful, the command has no output.
-
Run the following command to verify the managed node tags.
Removing tags from managed nodes
You can use the Systems Manager console or the command line to remove tags from managed nodes.
Removing tags from managed nodes (console)
Open the AWS Systems Manager console at https://console.aws.amazon.com/systems-manager/
. In the navigation pane, choose Fleet Manager.
-or-
If the AWS Systems Manager home page opens first, choose the menu icon (
) to open the navigation pane, and then choose Fleet Manager in the navigation pane.
-
Choose the name of the managed node to remove tags from, and then choose the Tags tab.
-
In the Tags section, choose Edit, and then choose Remove next to the tag pair you no longer need.
-
Choose Save.
Removing tags from managed nodes (command line)
-
Using your preferred command line tool, run the following command to list the managed nodes in your account.
Note the name of a managed node from which you want to remove tags.
-
Run the following command to remove tags from a managed node. Replace each
example resource placeholder
with your own information.If successful, the command has no output.
-
Run the following command to verify the managed node tags.