Tagging Systems Manager parameters
The topics in this section describe how to work with tags on AWS Systems Manager parameters (SSM parameters).
Topics
Creating parameters with tags
You can add tags to SSM parameters at the time you create them.
For information, see the following topics:
Adding tags to existing parameters
You can add tags to custom SSM parameters that you own by using the Systems Manager console or the command line.
Topics
Adding tags to an existing parameter (console)
Open the AWS Systems Manager console at https://console.aws.amazon.com/systems-manager/
. In the navigation pane, choose Parameter Store.
-or-
If the AWS Systems Manager home page opens first, choose the menu icon (
) to open the navigation pane, and then choose Parameter Store.
-
Choose the name of a parameter you have already created, and then choose the Tags tab.
-
In the first box, enter a key for the tag, such as
Environment
. -
In the second box, enter a value for the tag, such as
Test
. -
Choose Save.
Adding tags to an existing parameter (AWS CLI)
-
Using your preferred command line tool, run the following command to view the list of parameters that you can tag.
aws ssm describe-parameters
Note the name of a parameter that you want to tag.
-
Run the following command to tag a parameter. Replace each
example resource placeholder
with your own information.aws ssm add-tags-to-resource \ --resource-type "Parameter" \ --resource-id "
parameter-name
" \ --tags "Key=tag-key
,Value=tag-value
"If successful, the command has no output.
-
Run the following command to verify the parameter tags.
aws ssm list-tags-for-resource --resource-type "Parameter" --resource-id "
parameter-name
"
Adding tags to an existing parameter (AWS Tools for PowerShell)
-
Run the following command to list parameters that you can tag.
Get-SSMParameterList
-
Run the following commands to tag a parameter. Replace each
example resource placeholder
with your own information.$tag = New-Object Amazon.SimpleSystemsManagement.Model.Tag
$tag.Key = "
tag-key
"$tag.Value = "
tag-value
"Add-SSMResourceTag ` -ResourceType "Parameter" ` -ResourceId "
parameter-name
" ` -Tag $tag ` -Force -
Run the following command to verify the parameter tags.
Get-SSMResourceTag ` -ResourceType "Parameter" ` -ResourceId "
parameter-name
"
Removing tags from SSM parameters
You can use the Systems Manager console or the command line to remove tags from SSM parameters.
Removing tags from SSM parameters (console)
Open the AWS Systems Manager console at https://console.aws.amazon.com/systems-manager/
. In the navigation pane, choose Parameter Store.
-or-
If the AWS Systems Manager home page opens first, choose the menu icon (
) to open the navigation pane, and then choose Parameter Store.
-
Choose the name of the parameter to remove tags from, and then choose the Tags tab.
-
Choose Remove next to the tag pair you no longer need.
-
Choose Save.
Removing tags from SSM parameters (command line)
-
Using your preferred command line tool, run the following command to list the parameters in your account.
Note the name of a parameter from which you want to remove tags.
-
Run the following command to remove tags from a parameter. Replace each
example resource placeholder
with your own information.If successful, the command has no output.
-
Run the following command to verify the document tags.