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

Error When Fetching IAM Managed Policy #768

Closed
zepplen opened this issue Apr 7, 2015 · 1 comment
Closed

Error When Fetching IAM Managed Policy #768

zepplen opened this issue Apr 7, 2015 · 1 comment

Comments

@zepplen
Copy link

zepplen commented Apr 7, 2015

When ever I try to fetch a managed policy via the IAM::Resource.policy method, I get an error:

pry
[1] pry(main)> require 'aws-sdk'
=> true
[2] pry(main)> Aws::VERSION
=> "2.0.36"
[3] pry(main)> iam = Aws::IAM::Resource.new(region: 'us-east-1')
=> #<Aws::IAM::Resource>
[4] pry(main)> policy = iam.policy('arn:aws:iam::OUR-ACTUAL-ACCOUNT-ID:policy/Base-Default')
ArgumentError: missing required option :arn
from /home/mtrimmer/.rvm/gems/ruby-2.1.5@infra_builder/gems/aws-sdk-resources-2.0.36/lib/aws-sdk-resources/resource.rb:183:in `block in extract_identifiers'
@trevorrowe
Copy link
Member

Thank you for reporting the issue. I verified the bug and just submitted a patch. The fix should be released shortly. Until the fix is available you can use the following workaround:

policy = Aws::IAM::Policy.new(arn, region:'us-east-1')

@srchase srchase added the bug label Dec 24, 2018
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

3 participants