Skip to main content

AWS Profile Switcher - Manage AWS CLI profiles easily

Project description

AWSP - AWS Profile Switcher

A command-line utility for easily managing and switching between AWS CLI profiles.

Features

  • List profiles - View all configured AWS profiles (IAM and SSO)
  • Switch profiles - Interactive profile selection with fuzzy search
  • Add profiles - Create new IAM or SSO profiles interactively
  • Remove profiles - Safely remove profiles with confirmation
  • Validate credentials - Test AWS credentials using STS
  • Shell integration - Seamless profile switching in bash, zsh, and fish

Installation

macOS / Linux

# Install pipx (if not installed)
brew install pipx    # macOS
# or: sudo apt install pipx    # Ubuntu/Debian

# Install awsp
pipx install awsp

# Set up shell integration
awsp setup
source ~/.zshrc  # or ~/.bashrc for Bash

Windows

# Install pipx (if not installed)
pip install --user pipx
pipx ensurepath

# Restart PowerShell, then install awsp
pipx install awsp

# Set up shell integration
awsp setup
. $PROFILE

Alternative: pip install

pip install awsp

Note: pipx is recommended as it installs CLI tools in isolated environments.

Quick Start

macOS / Linux

# Add a new profile
awsp add

# Activate a profile
awsp activate my-profile

# Deactivate current profile
awsp deactivate

# List all profiles
awsp list

# Validate credentials
awsp validate

Windows (PowerShell)

# Add a new profile
awsp add

# Activate a profile
awsp activate my-profile

# Deactivate current profile
awsp deactivate

# List all profiles
awsp list

# Validate credentials
awsp validate

Shell Integration

Add to your shell configuration for automatic profile switching:

Bash (~/.bashrc):

eval "$(awsp init)"

Zsh (~/.zshrc):

eval "$(awsp init)"

Fish (~/.config/fish/config.fish):

awsp init --shell fish | source

PowerShell ($PROFILE):

Invoke-Expression (awsp init --shell powershell)

Or simply run awsp setup to auto-configure your shell.

Commands

Command Description
awsp setup Auto-configure shell integration (run once)
awsp activate [NAME] Activate a profile (sets AWS_PROFILE)
awsp deactivate Deactivate current profile (unsets AWS_PROFILE)
awsp list List all AWS profiles
awsp add Add a new profile (IAM or SSO)
awsp remove NAME Remove a profile
awsp current Show current active profile
awsp validate [NAME] Validate profile credentials
awsp info [NAME] Show detailed profile info
awsp init Output shell integration hook
awsp Interactive profile switcher
awsp switch [NAME] Alias for activate

Requirements

  • Python 3.10+
  • AWS CLI (for credential validation and SSO login)

Platform Support

Platform Shell Status
macOS Zsh, Bash, Fish ✅ Full support
Linux Bash, Zsh, Fish ✅ Full support
Windows PowerShell ✅ Full support

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

awsp-0.5.0.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

awsp-0.5.0-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file awsp-0.5.0.tar.gz.

File metadata

  • Download URL: awsp-0.5.0.tar.gz
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for awsp-0.5.0.tar.gz
Algorithm Hash digest
SHA256 8eeab49199ebd5625e86101390812915267bbbab091e4e8c8393c96b0dbae4f2
MD5 c056f55b0e8590f0b757470cadec4558
BLAKE2b-256 1e16f5376e4b60ae0f4276dbed2c80f13851883a46e4c12efef33fe9a764d519

See more details on using hashes here.

File details

Details for the file awsp-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: awsp-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for awsp-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 42fc42e6f19041953b868ced5a4ca8ef383b34d7637c9f060941bf0022c13f71
MD5 75c9875ea9d1d7cceec4c288d017169d
BLAKE2b-256 03267d93ebea778f8925d0b3fd19123cac7537357fb32913499accbe474c7295

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page