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

support STS credentials #89

Closed
automaticgiant opened this issue Apr 23, 2017 · 6 comments
Closed

support STS credentials #89

automaticgiant opened this issue Apr 23, 2017 · 6 comments

Comments

@automaticgiant
Copy link

not handled by 999c979

[dev]
aws_access_key_id = REDACTED
aws_secret_access_key = REDACTED
aws_session_token = REDACTED
aws_security_token = REDACTED
token_expiration = REDACTED

awless --aws-profile [dev] whoami
produces

Error: Your AWS credentials seem undefined! AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY need to be exported in your CLI environment
Installation documentation is at https://github.com/wallix/awless/wiki/Installation
@fxaguessy
Copy link
Contributor

Could you try rather with awless --aws-profile dev whoami -v (-v verbose flag will display the profile that is used to connect to AWS). There should not be [ and ] around the profile name.
But anyway, thanks for reporting, we will improve documentation.

@fxaguessy
Copy link
Contributor

By the way @automaticgiant , as far as I know, in the ~/.aws/config file, a new profile name should be prefixed with profile, i.e. :

[profile dev]
aws_access_key_id = REDACTED
aws_secret_access_key = REDACTED
aws_session_token = REDACTED
aws_security_token = REDACTED
token_expiration = REDACTED

@fxaguessy
Copy link
Contributor

@automaticgiant is this issue still valid ? did you try again with the correct ~/.aws/config file ?

@sdouche
Copy link

sdouche commented May 16, 2017

Hi,
I use a working STS account:

$ eval (assume-role MYACCOUNT)
$ aws ec2 describe-instances
{
    "Reservations": [
        {
            "ReservationId": "r-XXX",
...

But awless can't read something on the whoami command:

$ awless --aws-profile=MYACCOUNT whoami
Username: , Id: XXX, Account: XXX
[error]   InvalidParameter: 1 validation error(s) found.

@automaticgiant
Copy link
Author

automaticgiant commented May 17, 2017

oh yeah i guess you're right @fxaguessy . i was doing it wrong.
now i see what @sdouche sees.
also interesting i cannot awless config set aws.profile like in #33 because awless whoamiError: Your AWS credentials seem undefined! AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY need to be exported in your CLI environment

@fxaguessy fxaguessy added the bug label May 17, 2017
@sdouche
Copy link

sdouche commented May 22, 2017

No more error messages on 0.0.24:

ResourceType: assumed-role, Resource: AdministratorAccess/XXX, Id: XXX, Account: XXX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants