Last active
August 13, 2017 11:32
-
-
Save stuartwakefield/444fe9ea9780450c30ff31d80407ed92 to your computer and use it in GitHub Desktop.
Script to convert STS output to credentials file format
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
#!/bin/bash | |
# | |
# Converts the output of the AWS STS assume role | |
# CLI command into the correct format for a | |
# credentials file. | |
# | |
jq -r '"[default]\n" + | |
"aws_access_key_id = " + .Credentials.AccessKeyId + "\n" + | |
"aws_secret_access_key = " + .Credentials.SecretAccessKey + "\n" + | |
"aws_session_token = " + .Credentials.SessionToken' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment