1
0
mirror of https://github.com/akelge/zsh synced 2025-07-03 13:09:07 +00:00

Improved region support on awsprofile

This commit is contained in:
2023-09-04 09:45:41 +02:00
parent 894ed572a3
commit 21a8089908

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