Use custom aws profile with Role to assume

This commit is contained in:
Fayez Barbari
2020-01-20 14:36:01 -06:00
parent 754ff31ea3
commit f006c81e6a
2 changed files with 15 additions and 4 deletions

View File

@@ -439,6 +439,13 @@ if [[ $CHECK_ID ]];then
exit $EXITCODE
fi
if [[ $ACCOUNT_TO_ASSUME ]]; then
# unset env variables with assumed role credentials
unset AWS_ACCESS_KEY_ID
unset AWS_SECRET_ACCESS_KEY
unset AWS_SESSION_TOKEN
fi
execute_all
scoring