Creates aliases for aws cli profile management. Reads through your ~/.aws/config and presents a list of profiles.
aws-switch- switch profiles (with tab completion!)aws-list- list all profiles in ~/.aws/configaws-profile- show the current profile (whatever's in AWS_PROFILE)aws-clear- clear out AWS_PROFILE env var
Make sure you're grabbing the file with the right extension for your shell!
For vanilla ZSH, we'll store the function in its own file and source it from .zshrc
mkdir -p ~/.zsh/functionsAdd to ~/.zshrc
source ~/.zsh/functions/aws-profile.zshIf using oh-my-zsh, I think you can just place the file in
~/.oh-my-zsh/custom/aws-profile.zsh
Place contents into ~/.bash_profile (or maybe ~/.bashrc, depending).