Skip to content

Instantly share code, notes, and snippets.

@shuymn
Last active June 20, 2022 05:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shuymn/974d0fb4e04921954e459d5286caddee to your computer and use it in GitHub Desktop.
Save shuymn/974d0fb4e04921954e459d5286caddee to your computer and use it in GitHub Desktop.
aws-vault utility functions
ExportAwsVault() {
local profile
profile=$(aws-vault list --profiles | fzf) &&
unset AWS_VAULT &&
export $(aws-vault exec "$profile" --prompt=osascript -- env | grep AWS_)
}
# alias eva='ExportAwsVault'
UnsetAwsVault() {
unset $(env | grep AWS_ | sed 's/=.*//g')
}
# alias uva='UnsetAwsVault'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment