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"
21
21
# To use a specific version of the AWS CLI, set the ACK_AWS_CLI_IMAGE_VERSION
22
22
# environment variable, otherwise the value of DEFAULT_AWS_CLI_VERSION is used.
23
23
daws () {
24
+ aws_cli_profile_env=$( [ ! -z " $AWS_PROFILE " ] && echo " --env AWS_PROFILE=$AWS_PROFILE " )
24
25
aws_cli_img_version=${ACK_AWS_CLI_IMAGE_VERSION:- $DEFAULT_AWS_CLI_VERSION }
25
26
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 " " $@ "
27
28
}
28
29
29
30
# aws_check_credentials() calls the STS::GetCallerIdentity API call and
You can’t perform that action at this time.
0 commit comments