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: could not find AWS credentials. #3

Closed
strus38 opened this issue Apr 27, 2018 · 5 comments
Closed

Error: could not find AWS credentials. #3

strus38 opened this issue Apr 27, 2018 · 5 comments

Comments

@strus38
Copy link

strus38 commented Apr 27, 2018

Hi

What is wrong in this set of commands?

$ docker run --rm -v /home/miamore/.aws/:/home/scout2/.aws:rw -v report:/reports:rw valien/docker-scout2 -e AWS_PROFILE=ra3-dev
__Error: could not find AWS credentials. Use the --help option for more information.__

$ ls -la /home/miamore/.aws/
total 32
drwxr-xr-x  3 miamore miamore 4096 Apr 27 11:12 .
drwxr-xr-x 11 miamore miamore 4096 Apr 27 11:28 ..
drwxr-xr-x  3 miamore miamore 4096 Mar  6 02:20 cli
-rw-r--r--  1 miamore miamore 1777 Mar  6 05:46 config
-rw-r--r--  1 miamore miamore 8652 Apr 27 11:12 credentials
-rw-r--r--  1 miamore miamore  292 Mar  6 05:53 credentials.orig
@Valien
Copy link
Owner

Valien commented Apr 27, 2018

Hmm, weird. Ran your exact line (with my creds) and no issue. Take a look at your credentials file and make sure you have:

[ra3-dev]
aws_access_key_id=<your key>
aws_secret_access_key=<secret>

listed as an option.

@strus38
Copy link
Author

strus38 commented Apr 29, 2018

Hi
For sure I don't have this line, since I have to assume a role to get int ra3-dev.
So my credentials file looks like:

[test]
aws_access_key_id = KKKK
aws_secret_access_key = YYY
mfa_serial = XXXX

[ra3-dev]
role_arn = arn:aws:iam::XYZ:role/UR-BOUBOU
mfa_serial = XXXX
source_profile = test
region = eu-west-1

Is that not supported?
Thanks

@Valien
Copy link
Owner

Valien commented Apr 30, 2018

Looks like it is not. This is based on the Scout 2 repo and info here - https://github.com/nccgroup/Scout2#aws-credentials - says that an AWS Key and ID is required. Now the role those keys are for can be narrowed down so you could create a unique user and assign it the roles you have for ra3-dev but you would still need the Key and ID.

@strus38
Copy link
Author

strus38 commented Apr 30, 2018

OK, so trying like this, does not work either?

$ cat /home/miamore/.aws/credentials
[gcreds-ra3-dev]
aws_access_key_id = XXX
aws_secret_access_key = 1kjhYYYYmA2a
aws_security_token = FQoBOUBOU.....dGdEXNyi/rpvXBQ==

$  docker run --rm -v /home/miamore/.aws/:/home/scout2/.aws:rw -v report:/reports:rw valien/docker-scout2 -e AWS_PROFILE=gcreds-ra3-dev
Error: could not find AWS credentials. Use the --help option for more information.

Any idea? thanks in advance.

@kempy007
Copy link

Permissions.
Try chmod 777 ~.aws/* && chmod 777 ~/report

@Valien Valien closed this as completed Mar 26, 2020
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