GithubHelp home page GithubHelp logo

Comments (15)

arkadiyt avatar arkadiyt commented on July 18, 2024

Can you please provide some error output?

from aws_public_ips.

vr00n avatar vr00n commented on July 18, 2024

Hey @arkadiyt . Here you go.

sudo gem install aws_public_ips
Successfully installed aws_public_ips-1.0.0
$ aws_public_ips
-bash: aws_public_ips: command not found

I have confirmed that my gem directory is in my bash PATH.

from aws_public_ips.

arkadiyt avatar arkadiyt commented on July 18, 2024

@vr00n this was a silly oversight on my part. I believe it should be fixed in the newly pushed 1.0.1 version - can you let me know if it's working now?

from aws_public_ips.

vr00n avatar vr00n commented on July 18, 2024

Thanks. It is executable now but now errors with

$ aws_public_ips --help
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler/setup (LoadError)
	from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /Library/Ruby/Gems/2.3.0/gems/aws_public_ips-1.0.1/bin/aws_public_ips:6:in `<top (required)>'
	from /usr/local/bin/aws_public_ips:22:in `load'
	from /usr/local/bin/aws_public_ips:22:in `<main>'

from aws_public_ips.

arkadiyt avatar arkadiyt commented on July 18, 2024

Thanks for your patience - I believe this issue should now also be resolved in 1.0.2. It's rare to see an environment without bundler installed so it didn't come up in my testing

from aws_public_ips.

vr00n avatar vr00n commented on July 18, 2024

Thanks for your response @arkadiyt . I have to mention that I run saml2aws to manage multiple managed accounts. Now I receive this error :(

$ aws_public_ips -v
#<Aws::APIGateway::Errors::UnrecognizedClientException: The security token included in the request is invalid.>
/Library/Ruby/Gems/2.3.0/gems/aws-sdk-core-3.18.0/lib/seahorse/client/plugins/raise_response_errors.rb:15:in `call'
/Library/Ruby/Gems/2.3.0/gems/aws-sdk-core-3.18.0/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:20:in `call'
/Library/Ruby/Gems/2.3.0/gems/aws-sdk-core-3.18.0/lib/aws-sdk-core/plugins/idempotency_token.rb:17:in `call'
/Library/Ruby/Gems/2.3.0/gems/aws-sdk-core-3.18.0/lib/aws-sdk-core/plugins/param_converter.rb:24:in `call'
/Library/Ruby/Gems/2.3.0/gems/aws-sdk-core-3.18.0/lib/aws-sdk-core/plugins/response_paging.rb:10:in `call'
/Library/Ruby/Gems/2.3.0/gems/aws-sdk-core-3.18.0/lib/seahorse/client/plugins/response_target.rb:23:in `call'
/Library/Ruby/Gems/2.3.0/gems/aws-sdk-core-3.18.0/lib/seahorse/client/request.rb:70:in `send_request'
/Library/Ruby/Gems/2.3.0/gems/aws-sdk-apigateway-1.10.0/lib/aws-sdk-apigateway/client.rb:3533:in `get_rest_apis'
/Library/Ruby/Gems/2.3.0/gems/aws_public_ips-1.0.2/lib/aws_public_ips/checks/apigateway.rb:16:in `run'
/Library/Ruby/Gems/2.3.0/gems/aws_public_ips-1.0.2/lib/aws_public_ips/cli.rb:85:in `check_service'
/Library/Ruby/Gems/2.3.0/gems/aws_public_ips-1.0.2/lib/aws_public_ips/cli.rb:99:in `block in run'
/Library/Ruby/Gems/2.3.0/gems/aws_public_ips-1.0.2/lib/aws_public_ips/cli.rb:98:in `map'
/Library/Ruby/Gems/2.3.0/gems/aws_public_ips-1.0.2/lib/aws_public_ips/cli.rb:98:in `run'
/Library/Ruby/Gems/2.3.0/gems/aws_public_ips-1.0.2/bin/aws_public_ips:7:in `<top (required)>'
/usr/local/bin/aws_public_ips:22:in `load'
/usr/local/bin/aws_public_ips:22:in `<main>'

from aws_public_ips.

arkadiyt avatar arkadiyt commented on July 18, 2024

If it's this tool:
https://github.com/Versent/saml2aws

It says in the docs:

Save these credentials to an aws profile named "saml"

So I think you should be able to get this working with:

AWS_PROFILE=saml aws_public_ips

from aws_public_ips.

vr00n avatar vr00n commented on July 18, 2024

hmm my AWS_PROFILE is already saying but still get the token error

AWS_PROFILE=saml aws_public_ips
#<Aws::APIGateway::Errors::UnrecognizedClientException: The security token included in the request is invalid.>

from aws_public_ips.

arkadiyt avatar arkadiyt commented on July 18, 2024

But those credentials are valid for other uses? Do you get successful output from the aws cli if you run:

$ AWS_PROFILE=saml aws sts get-caller-identity

from aws_public_ips.

vr00n avatar vr00n commented on July 18, 2024

Yes when I run aws s3 ls --profile prod - it works.
FYI This time the token is expired. Before it was invalid.

$ AWS_PROFILE=saml aws sts get-caller-identity

An error occurred (ExpiredToken) when calling the GetCallerIdentity operation: The security token included in the request is expired

from aws_public_ips.

arkadiyt avatar arkadiyt commented on July 18, 2024

You're using 2 different profiles there, prod and saml.

  1. Does aws_public_ips work with your prod profile?
$ AWS_PROFILE=prod aws_public_ips
  1. With this new "expired" error, can you now run aws_public_ips with the saml profile?
$ saml2aws login
$ AWS_PROFILE=saml aws_public_ips

from aws_public_ips.

vr00n avatar vr00n commented on July 18, 2024

Ok something seems to have worked. When I ran AWS_PROFILE=prod aws_public_ips - it returned a bunch of IPs. I then tried this and error :(

$ aws_public_ips -s .
#<ArgumentError: Invalid service(s): .>
/Library/Ruby/Gems/2.3.0/gems/aws_public_ips-1.0.2/lib/aws_public_ips/cli.rb:105:in `rescue in run': undefined method `[]' for nil:NilClass (NoMethodError)
	from /Library/Ruby/Gems/2.3.0/gems/aws_public_ips-1.0.2/lib/aws_public_ips/cli.rb:96:in `run'
	from /Library/Ruby/Gems/2.3.0/gems/aws_public_ips-1.0.2/bin/aws_public_ips:7:in `<top (required)>'
	from /usr/local/bin/aws_public_ips:22:in `load'
	from /usr/local/bin/aws_public_ips:22:in `<main>'

from aws_public_ips.

arkadiyt avatar arkadiyt commented on July 18, 2024

That's the correct behavior - you can specify a comma separated list of services like

aws_public_ips -s ec2,elasticsearch

for instance. If you omit the parameter it checks all services. If you add the parameter and specify no services it throws an exception (because it is probably user error)

from aws_public_ips.

arkadiyt avatar arkadiyt commented on July 18, 2024

@vr00n there was another issue resolved this morning, can you give the latest a try when you get a chance?

from aws_public_ips.

arkadiyt avatar arkadiyt commented on July 18, 2024

@vr00n I'm going to close this out, I'm reasonably sure it's resolved. If you come back and are still seeing issues then I'm happy to re-open and continue working on it - thanks!

from aws_public_ips.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.