Created
April 19, 2022 00:05
-
-
Save j-griffith/37c63474c4dbd556974188de1ac6256b 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
#!/bin/bash | |
# Work around dumb ENV var for AWS config settings that are only good in current session | |
# Messed with env var init tricks, but at the end of the day, just much easier to write | |
# a proper credentials file out, then it's good for all sessions | |
# alias `awslogin="aws-login <account> <user> && update-aws-creds.sh"` | |
cat >~/.aws/credentials <<EOF | |
[default] | |
aws_access_key_id=$AWS_ACCESS_KEY_ID | |
aws_secret_access_key=$AWS_SECRET_ACCESS_KEY | |
aws_session_token=$AWS_SESSION_TOKEN | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment