From ad7ee2c2a386604a0e70ad2ef31928a3908b91c0 Mon Sep 17 00:00:00 2001 From: Florian Motlik Date: Wed, 3 Oct 2018 14:47:52 +0200 Subject: [PATCH] Allow AWS_PROFILE to be used from the environment AWS_PROFILE is a default AWSCLI environment variable configuring the profile to use. Prowler should accept it as well and not set the default profile. More information on AWSCLI environment variables can be found in the docs: https://docs.aws.amazon.com/cli/latest/userguide/cli-environment.html --- include/aws_profile_loader | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/aws_profile_loader b/include/aws_profile_loader index a5e06de3..7fc212dd 100644 --- a/include/aws_profile_loader +++ b/include/aws_profile_loader @@ -23,7 +23,7 @@ fi if [[ $PROFILE ]]; then PROFILE_OPT="--profile $PROFILE" -elif [[ $AWS_ACCESS_KEY_ID && $AWS_SECRET_ACCESS_KEY || $AWS_SESSION_TOKEN ]];then +elif [[ $AWS_ACCESS_KEY_ID && $AWS_SECRET_ACCESS_KEY || $AWS_SESSION_TOKEN || $AWS_PROFILE ]];then PROFILE="ENV" PROFILE_OPT="" elif [[ -n $AWS_CONTAINER_CREDENTIALS_RELATIVE_URI ]] && [[ -z $INSTANCE_PROFILE ]]; then