A simple tool for managing AWS CLI profiles, available in two flavors:
- Shell Script version: lightweight, terminal-based utility for quick profile switching and Docker ECR login.
- GUI (Tkinter) version: user-friendly graphical interface for selecting profiles and managing AWS credentials.
- Lists AWS profiles from
~/.aws/credentials - Prompts to select or add a profile
- Sets
AWS_PROFILEandAWS_REGIONin the current shell - Validates credentials with AWS STS
- Optionally logs in to Docker ECR if
dockeris available
Usage:
source shell/aws_profileAdd this alias to ~/.bashrc:
echo 'alias switchaws="source ~/.local/bin/aws_profile"' >> ~/.bashrc- Uses Python and Tkinter to provide a dropdown UI
- Detects available AWS profiles
- Sets selected profile and region in the environment
- Attempts to login to Docker ECR after switching
- Auto-closes once a profile is activated
Requirements:
python3,python3-tk,xdotool,awscli
Launch:
python3 gui/aws_profile_gui.py- Use as local scripts
- Package as
.debinstallers (seebuild.mdfor packaging instructions)
Alden Park