File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,10 @@ DEFAULT_AWS_CLI_VERSION="2.0.52"
2121# To use a specific version of the AWS CLI, set the ACK_AWS_CLI_IMAGE_VERSION
2222# environment variable, otherwise the value of DEFAULT_AWS_CLI_VERSION is used.
2323daws () {
24+ aws_cli_profile_env=$( [ ! -z " $AWS_PROFILE " ] && echo " --env AWS_PROFILE=$AWS_PROFILE " )
2425 aws_cli_img_version=${ACK_AWS_CLI_IMAGE_VERSION:- $DEFAULT_AWS_CLI_VERSION }
2526 aws_cli_img=" amazon/aws-cli:$aws_cli_img_version "
26- docker run --rm -v ~ /.aws:/root/.aws:z -v $( pwd) :/aws " $aws_cli_img " " $@ "
27+ docker run --rm -v ~ /.aws:/root/.aws:z $( echo $aws_cli_profile_env ) -v $( pwd) :/aws " $aws_cli_img " " $@ "
2728}
2829
2930# aws_check_credentials() calls the STS::GetCallerIdentity API call and
You can’t perform that action at this time.
0 commit comments