TylerBrock/saw

Docker setup not recognising profile

pandaadb opened this issue · 2 comments

Hi,

Love your tool - i tried it via docker and could not get it to work, so figured i'll create an issue. I tried the install version and it does exactly what i would want it to do!

Via docker however:

artur@pandaadb ~/dev/ $ docker run --rm -it -v ~/.aws:/home/.aws tbrock/saw --profile MY_PROFILE --region MY_REGION watch MY_LOG_GROUP 
Error NoCredentialProviders: no valid providers in chain. Deprecated.
	For verbose messaging see aws.Config.CredentialsChainVerboseErrors

I had a feeling this might have something to do with the mapping location in home/.aws for the credentials. My ~/.aws is definitely setup right (as it works fine with the installed version and aws cli).

Setting the AWS_CONFIG_FILE and the AWS_CREDENTIALS_PROFILES_FILE yields a different error:

panic: SharedConfigAssumeRoleError: failed to load assume role for <MYROLE> source profile has no shared credentials

Thanks and please let me know if I am missing any info on this.

Artur

Do this:

docker run --rm -it \
    -e AWS_SHARED_CREDENTIALS_FILE=/home/aws/credentials \
    -v ${HOME}/.aws:/home/aws:ro \
    tbrock/saw watch /aws/codebuild/development-stations --region us-east-1

Works like a charm :) Thanks!