Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ if ([string]::IsNullOrWhiteSpace($AWS_REGION))
echo "AWS_REGION not set, check your aws profile or set AWS_DEFAULT_REGION"
Exit 2
}
aws ec2 describe-regions | Select-String -Pattern "$AWS_REGION" | Out-Null
if (-not $?)
{
Write-host "Invalid region $AWS_REGION set, please set a valid region using aws configure"
Exit 2
}

cd ${CURRENT_DIR}
Write-host "Building requirements for SaaS Boost"
Expand Down
5 changes: 5 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ fi
# check for AWS region
if [ -z $AWS_DEFAULT_REGION ]; then
export AWS_REGION=$(aws configure list | grep region | awk '{print $2}')
aws ec2 describe-regions | grep "$AWS_REGION" - > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Invalid region set, please set a valid region using \`aws configure\`"
exit 2
fi
if [ -z $AWS_REGION ]; then
echo "AWS_REGION environment variable not set, check your AWS profile or set AWS_DEFAULT_REGION."
exit 2
Expand Down