good morning. Does anyone have any advice for tagging a user with the AWS CLI? I am following the AWS documentation found here for adding tags to a user: https://docs.aws.amazon.com/cli/latest/reference/iam/tag-user.html The example they provide is:
aws iam tag-user --user-name alice --tags '{"Key": "Department", "Value": "Accounting"}'
This is the command I am running for my purposes:
aws iam tag-user --user-name access-Arnav-peg-eng --tags '{"Key": "access-project", "Value": "peg"}'
When I run the command, however, I receive the following error:
Error parsing parameter '--tags': Expected: '=', received: ''' for input:
'{Key:
^
I have tried a number of different permutations and combinations figuring maybe the CLI has changed but the documentation hasn't been updated, but none of those worked.
Some examples included:
aws iam tag-user --user-name access-Arnav-peg-eng --tags "{"Key"="access-control","Value"="peg"}"
aws iam tag-user --user-name access-Arnav-peg-eng --tags '[{"Key"="access-control","Value"="peg"}]'
And so on. Have I been typing something wrong? Has the CLI changed and the documentation doesn't reflect that? Each time I try to add a tag to a user from the command line, it doesn't work. I know everything is properly configured. I have been creating users and performing other actions from it. I am using aws-cli/2.2.44 Python/3.8.8 Windows/10 exe/AMD64 prompt/off.
Does anyone have any suggestions? Thanks in advance.