Ensure AWS_PROFILE is unset

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
Marcus Noble 2022-07-15 07:51:06 +01:00
parent 93134c7f30
commit f363cabe84
Signed by: AverageMarcus
GPG Key ID: B8F2DB8A7AEBAF78

View File

@ -64,6 +64,8 @@ if [ -z $MFA ] || [ -z $MFA_ARN ]; then
exit 1 exit 1
fi fi
unset AWS_PROFILE
printf "✨ Getting session credentials..." printf "✨ Getting session credentials..."
SESSION_JSON=$(aws sts get-session-token --serial-number ${MFA_ARN} --token-code ${MFA}) SESSION_JSON=$(aws sts get-session-token --serial-number ${MFA_ARN} --token-code ${MFA})
printf "\n\e[1A\e[K✅ Got session credentials\n" printf "\n\e[1A\e[K✅ Got session credentials\n"