Skip to content

bug(avp): does not respect $AWS_CONFIG_FILE #44

Description

@blimmer

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions