AWS Identity Center Permission Sets Switcher
Interactively select an AWS Account and Permission Set after SSO login, and the temporary credentials are automatically set in your current shell.
- Browser-based SSO Login — OIDC device authorization with token caching
- Interactive Selection — fzf-style fuzzy search for Account and Permission Set
- Quick Switch —
awspss sw RoleNameto skip interactive selection - Tab Completion —
awspss sw <Tab>to autocomplete permission sets - Shell Integration — credentials are set directly in your current shell (no
--profileneeded) - Credential Expiry — shows when your temporary credentials expire
- Identity Check —
awspss whoamito verify current credentials
pip install awspss
# or pipx (recommended for CLI tools)
pipx install awspssbrew tap boseung-code/tap
brew install awspssgit clone https://github.com/boseung-code/awspss.git
cd awspss
pip install -e .# 1. Register shell function + tab completion
eval "$(awspss init)"
# 2. Configure SSO connection
awspss configure
# 3. Login and select account/permission set
awspss login
# 4. Switch to another account/permission set
awspss sw
# 5. Quick switch (permission set only, tab completion supported)
awspss sw AdministratorAccessShell function registration is required for awspss login and awspss sw to set credentials directly in your current shell. This also enables Tab completion.
eval "$(awspss init)"This will:
- Detect your shell rc file (
.bashrcor.zshrc) - Ask for confirmation
- Register to rc file + activate immediately in current shell
Duplicate registration is prevented. New terminals will activate automatically.
To register manually, add to your .bashrc or .zshrc:
eval "$(awspss init --print)"awspss configurePrompts for start-url and region interactively. You can also pass them directly:
awspss configure --start-url https://your-org.awsapps.com/start --region ap-northeast-2awspss loginAlways performs a fresh SSO authentication via browser. After authentication, select Account → Permission Set and credentials are set in your current shell.
awspss swSwitch to a different Account/Permission Set using cached token (no re-login). Automatically re-authenticates if the token has expired.
awspss sw AdministratorAccessSwitch to a different Permission Set within the same account without interactive selection. Tab completion is supported — press Tab after awspss sw to see available permission sets.
awspss whoamiawspss unsetawspss logouteval "$(awspss login)"
eval "$(awspss sw)"| Command | Description |
|---|---|
awspss init |
Register shell function + tab completion |
awspss configure |
Configure SSO connection |
awspss login |
SSO login (always re-authenticates) |
awspss sw |
Switch account/permission set |
awspss sw [ROLE] |
Quick switch permission set (Tab completion) |
awspss whoami |
Show current AWS identity |
awspss unset |
Clear AWS credentials from current shell |
awspss logout |
Clear cached SSO token |
awspss --version |
Show version |
| Method | Example |
|---|---|
| Config file | ~/.awspss/config.json (via awspss configure) |
| Environment variable | AWSPSS_START_URL, AWSPSS_REGION |
| CLI flag | --start-url, --region |
Priority: CLI flag > Environment variable > Config file
- Python 3.10+
- AWS Identity Center (SSO) enabled
- A browser for SSO authentication
This project is licensed under the MIT License.
Contributions are welcome! Feel free to open an issue or submit a pull request.
If you find this tool useful, please consider giving it a star!