Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws iam put-user-policy appears broken in 0.6.0 #51

Closed
nonspecialist opened this issue Feb 20, 2013 · 1 comment
Closed

aws iam put-user-policy appears broken in 0.6.0 #51

nonspecialist opened this issue Feb 20, 2013 · 1 comment

Comments

@nonspecialist
Copy link

using:
aws-cli/0.6.0 Python/2.7.3 Linux/3.7.6-102.fc17.x86_64

gives the stack trace:

$ aws iam put-user-policy --user-name snoopy --policy-name tooty
Traceback (most recent call last):
  File "/usr/bin/aws", line 24, in <module>
    main()
  File "/usr/bin/aws", line 20, in main
    driver.main()
  File "/usr/lib/python2.7/site-packages/awscli/clidriver.py", line 315, in main
    args = self.create_service_parser(remaining)
  File "/usr/lib/python2.7/site-packages/awscli/clidriver.py", line 136, in create_service_parser
    return self.create_operation_parser(remaining)
  File "/usr/lib/python2.7/site-packages/awscli/clidriver.py", line 167, in create_operation_parser
    type=self.type_map[param.type],
KeyError: u'jsondoc'

supplying the policy as a document on the command-line as raw JSON has the same issue.

@garnaat
Copy link
Contributor

garnaat commented Feb 24, 2013

I believe this is fixed, as of 0.7.0. We removed the jsondoc attribute from the model. Now, if you have a JSON policy in a file called, for example, my_policy.json, you can refer to that file like this:

$ aws iam put-user-policy --user-name snoopy --policy-name tooty --policy-document file:my_policy.json

You can specify a relative or full-qualified path after the file: prefix. I hope that works for you. I'm going to close this issue now but re-open if you continue to have problems.

@garnaat garnaat closed this as completed Feb 24, 2013
kdaily pushed a commit to kdaily/aws-cli that referenced this issue Apr 15, 2021
Add support for downloading to special files
thoward-godaddy pushed a commit to thoward-godaddy/aws-cli that referenced this issue Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants