Last active
August 15, 2023 20:09
-
-
Save AbirRazzak/9e77e2ba56a6e904f88b5ffd04210f6d to your computer and use it in GitHub Desktop.
AWS Auth Functions for Oh My Zsh Profile
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
# Use `auth` to refresh or use new AWS credentials for the current terminal instance | |
auth() { | |
aws configure sso | |
eval "$(aws configure export-credentials --profile default --format env)" | |
} | |
# Use `setauth` to set current AWS session to current terminal instance | |
# Helpful when you've already auth'ed in a different terminal instance | |
setauth() { | |
eval "$(aws configure export-credentials --profile default --format env)" | |
} | |
export AWS_DEFAULT_REGION='us-east-1' | |
export AWS_PROFILE='default' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment