Last active
November 9, 2022 17:22
-
-
Save zaccharles/53c23be0af43bb8fcfe2f2ba520b9b73 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function assume-role() { | |
export $(printf "AWS_ACCESS_KEY_ID=%s AWS_SECRET_ACCESS_KEY=%s AWS_SESSION_TOKEN=%s" \ | |
$(aws sts assume-role \ | |
--role-arn $1 \ | |
--role-session-name $USER \ | |
--query "Credentials.[AccessKeyId,SecretAccessKey,SessionToken]" \ | |
--output text)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment