Created
October 2, 2017 09:10
-
-
Save andytumelty/431ef107f62da8d3908d5ba135eb37fc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Save output of AWS STS Assume Role to temporary credentials file for further use | |
aws sts assume-role --role-arn arn:aws:iam::12345:role/role_to_assume --role-session-name laycat-session |\ | |
jq '.Credentials | "[default] | |
aws_access_key_id=\(.AccessKeyId) | |
aws_secret_access_key=\(.SecretAccessKey) | |
aws_session_token=\(.SessionToken) | |
"' | xargs printf > ~/.aws/tmp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment