diff --git a/zsh/lib/cloud/aws/cli.module.zsh b/zsh/lib/cloud/aws/cli.module.zsh index 4274e3b..a84cb9b 100644 --- a/zsh/lib/cloud/aws/cli.module.zsh +++ b/zsh/lib/cloud/aws/cli.module.zsh @@ -9,11 +9,15 @@ REQUIRED_ENV+=() ##################################################################### AWS() { - REQUIRED_ENV=(AWS_REGION AWS_ACCOUNT AWS_PROFILE) CHECK_ENVIRONMENT || return 1 + local ARGS=() - aws \ - --profile $AWS_PROFILE \ - --region $AWS_REGION \ - --output json \ - $@ + ARGS+=(--output json) + + [ ! $CI ] && { + REQUIRED_ENV=(AWS_REGION AWS_ACCOUNT AWS_PROFILE) CHECK_ENVIRONMENT || return 1 + ARGS+=(--profile $AWS_PROFILE) + ARGS+=(--region $AWS_REGION) + } + + aws ${ARGS[@]} $@ }