aws-vault login iso-ne-sandbox --stdout | xargs -t /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
$ aws-vault --debug login <PROFILE> --stdout | xargs -t /Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --args --no-first-run --new-window -disk-cache-dir=$(mktemp -d /tmp/chromecanary.XXXXXX) --user-data-dir=$(mktemp -d /tmp/chromecanary.XXXXXX)
$ alias awslogin='aws-vault --debug login <PROFILE> --stdout | xargs -t /Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --args --no-first-run --new-window -disk-cache-dir=$(mktemp -d /tmp/chromecanary.XXXXXX) --user-data-dir=$(mktemp -d /tmp/chromecanary.XXXXXX)'
which allows you to call Roles with:
$ p=MY-ROLE && awslogin
Inspired by https://github.com/blimmer/zsh-aws-vault/blob/master/zsh-aws-vault.plugin.zsh
$ alias awslogin='aws-vault --debug login <PROFILE> --stdout | xargs -t /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --incognito --new-window'
function awslogin() {
_OS=$(uname)
_FF_LOCATION=""
if [[ "${_OS}" == "Linux" ]]; then
_FF_LOCATION=$(which firefox)
fi
if [[ "${_OS}" == "Darwin" ]]; then
_FF_LOCATION=$(which firefox)
fi
aws-vault --debug login $1 --stdout | xargs -t "${_FF_LOCATION}" --private-window
}