Improved region support on awsprofile

This commit is contained in:
Andrea Mistrali 2023-09-04 09:45:41 +02:00
parent 894ed572a3
commit 21a8089908
Signed by: andre
SSH Key Fingerprint: SHA256:/D780pZnuHMQ8xFII5lAtXWy8zdowtBhgWjwi88p+lI
1 changed files with 9 additions and 0 deletions

View File

@ -3,6 +3,15 @@ profile=$1
region=${1:-""}
declare -A symRegions
symRegions[ire1]='eu-west-1'
symRegions[fra1]='eu-central-1'
symRegions[ohio1]='us-east-2'
lookup_region=${symRegions[$region]}
[ -z $lookup_region ] || region=${lookup_region}
if [ ! -f ~/.aws/config ]; then
echo "no aws config file found, bailing out..."
return 1