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

Added awslogin function, that uses saml2aws

This commit is contained in:
root
2020-04-17 11:15:12 +02:00
parent 701ea57d10
commit 58f5f25325
3 changed files with 14 additions and 3 deletions

View File

@ -0,0 +1,11 @@
if [[ -z "$1" ]]
then
unset AWS_DEFAULT_PROFILE AWS_PROFILE AWS_EB_PROFILE
echo AWS profile cleared.
return
fi
saml2aws login -a $1 -p $1
eval $(saml2aws script -a $1 -p $1 --skip-prompt)
export AWS_DEFAULT_PROFILE=$1
export AWS_PROFILE=$1
export AWS_EB_PROFILE=$1