diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh index 0c43031df..58adfc770 100644 --- a/plugins/aws/aws.plugin.zsh +++ b/plugins/aws/aws.plugin.zsh @@ -43,6 +43,14 @@ function asp() { export AWS_EB_PROFILE=$1 export AWS_PROFILE_REGION=$(aws configure get region) + if [[ -z "${AWS_PROFILE_REGION}" ]]; then + if [[ -z "${available_profiles[(r)default]}" ]]; then + echo "region defaulting to us-east-1" + else + export AWS_PROFILE_REGION=$(aws configure get region --profile default) + fi + fi + export AWS_REGION=$AWS_PROFILE_REGION _aws_update_state