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-recon not honoring AWS_PROFILE variable #6

Closed
rams3sh opened this issue Jul 24, 2020 · 1 comment
Closed

aws-recon not honoring AWS_PROFILE variable #6

rams3sh opened this issue Jul 24, 2020 · 1 comment

Comments

@rams3sh
Copy link

rams3sh commented Jul 24, 2020

I tried running aws-recon for multiple accounts. The instance where aws-recon resides is part of an account with a role attached to it and an aws config file with assume role profiles to multiple accounts.

The format of my ~/.aws/config looks like this :-

....

[profile  random-1 ]
role_arn =  arn:aws:iam::111111111111:role/randomRole
credential_source = Ec2InstanceMetadata

[profile  random-2 ]
role_arn =  arn:aws:iam::222222222222:role/randomRole
credential_source = Ec2InstanceMetadata

.....

This is the command I used

AWS_REGION=us-east-1 AWS_PROFILE=random-1 ruby recon.rb --services=s3 -v 

The output remains the same across each run and I found that its been scanning the current account and has not been honoring the AWS_PROFILE.

I have followed the same method as suggested in the README. I am not quite sure if this is a bug or I am doing some mistake.

Also I would suggest to have --profile as an argument to the tool which would resemble aws-cli like syntax and would be easier to use and adopt.

@joshlarsen
Copy link
Owner

We do not have plans to support different profiles within the tool itself, we will just use what is currently exposed in the environment. See here for details on how the Ruby SDK uses credentials.

The exception to that is that setting AWS_REGION only affects global service calls, since we pin the client to a specific region for all regional service calls.

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