- Le plus récent
- Le plus de votes
- La plupart des commentaires
Yes, my guess is also that it is the version. I also just tried on an EC2 Amazon Linux 2 with the default aws cli of 1.16.102, and it worked fine.
[ec2-user@ip-172-31-81-169 ~]$ aws ssm add-tags-to-resource --resource-type "Parameter" --resource-id "/pets/dog/kukki" --tags "Key=car,Value=mazda"
[ec2-user@ip-172-31-81-169 ~]$ aws ssm list-tags-for-resource --resource-type "Parameter" --resource-id "/pets/dog/kukki"
{
"TagList": [
{
"Value": "mazda",
"Key": "car"
},
{
"Value": "qa",
"Key": "org"
}
]
}
[ec2-user@ip-172-31-81-169 ~]$ aws --version
aws-cli/1.16.102 Python/2.7.16 Linux/4.14.123-111.109.amzn2.x86_64 botocore/1.12.92
-randy
Hi,
I was not able to reproduce your problem in my environment.
rtakeshi@DESKTOP-OT2QIS0:~$ aws ssm add-tags-to-resource --resource-type "Parameter" --resource-id "/pets/dog/kukki" --t
ags "Key=org,Value=qa"
rtakeshi@DESKTOP-OT2QIS0:~$ aws ssm list-tags-for-resource --resource-type "Parameter" --resource-id "/pets/dog/kukki"
{
"TagList": [
{
"Key": "org",
"Value": "qa"
}
]
}
rtakeshi@DESKTOP-OT2QIS0:~$ aws --version
aws-cli/1.14.44 Python/3.6.8 Linux/4.4.0-17763-Microsoft botocore/1.8.48
Note: when I was testing, I accidentally mispelled "pets" as "petg" and saw the following:
rtakeshi@DESKTOP-OT2QIS0:~$ aws ssm add-tags-to-resource --resource-type "Parameter" --resource-id "/petg/dog/kukki" --t
ags "Key=org,Value=qa"
An error occurred (InvalidResourceId) when calling the AddTagsToResource operation:
Is there any chance that the Parameter store name does NOT match "/build-number/ExcelService"?
-randy
Hi Randy,
Thanks for your response. Yes, I am positive the name was spelled correctly. I even copy-pasted it into the command as a sanity check. I also duplicated your parameter, and your command, exactly and I'm still getting the same error.
Since there is a discrepancy in behaviour, I wonder if this is because I'm using the version of the CLI installed with pip? I made the switch a while ago because the msi-installed CLI was throwing an error on certain S3 commands (see https://stackoverflow.com/questions/53144254/aws-cli-upload-failed-unknown-encoding-idna). That's the only difference I can think of off the top of my head.
Yeah, seems to be a Windows thing, actually. It works when I test from a Linux EC2 instance, but I tested with some coworkers' machines and it doesn't seem to work on Windows whether the .msi or pip was used to install.
Guess I won't worry about it much more at the moment, though maybe I'll file a bug report somewhere. Thanks for the help!
Contenus pertinents
- demandé il y a 14 jours
- demandé il y a un an
- demandé il y a 5 mois
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a 2 ans