Skip to content

Instantly share code, notes, and snippets.

@vedit
Last active September 11, 2021 08:45
Show Gist options
  • Save vedit/b39348514a05f122ffed4d76aad5d835 to your computer and use it in GitHub Desktop.
Save vedit/b39348514a05f122ffed4d76aad5d835 to your computer and use it in GitHub Desktop.
AWS Profile Selector
#!/bin/bash
export AWS_PROFILE=$(zenity --list $(cat ~/.aws/config | grep profile | sed 's/profile //g' | sed 's/\[//g' | sed 's/\]//g' | sort) --column="" --text="Select a Profile" --title="AWS Profile Selection")
echo "${AWS_PROFILE}"
# Call the script with either "source awspr" or ". awspr" after placing the script in your path and making it executable
# Or add an alias by adding the following line to your .bashrc
# alias awsp=". awspr"
@alicankustemur
Copy link

first brew install zenity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment