It currently hardcodes ~/.aws/config
|
function avp() { |
|
local -a profiles |
|
local _profile_text _role |
|
if egrep -arn "^\[default\]" ~/.aws/config >/dev/null; then |
|
profiles+="default: IAM_Keys" |
|
fi |
|
for item in $(grep "\[profile " ~/.aws/config | sed -e 's/.*profile \([a-zA-Z0-9_-]*\).*/\1/' | sort); do |
|
_profile_text="$item: " |
|
_role=$(aws --profile $item configure get role_arn) |
|
if [ "$_role" != "" ]; then |
|
_profile_text+="ROLE($_role) " |
|
fi |
|
profiles+=$_profile_text |
|
done |
|
printf '%s\n' "${profiles[@]}" | column -t |
|
} |
It currently hardcodes
~/.aws/configzsh-aws-vault/zsh-aws-vault.plugin.zsh
Lines 110 to 125 in 2b3ae32