awspss
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.
Installation
pip / pipx
pip install awspss
# or pipx (isolated environment)
pipx install awspss
Homebrew
brew tap boseung-code/tap
brew install awspss
From source
git clone https://github.com/boseung-code/awspss.git
cd awspss
pip install -e .
Setup
1. Register shell function
Shell function registration is required for awspss login and awspss sw to set credentials directly in your current shell. This also enables Tab completion for commands.
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)"
2. Configure SSO connection
awspss configure
Prompts 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-2
Usage
Login
awspss login
Always performs a fresh SSO authentication via browser. After authentication, select Account → Permission Set and credentials are set in your current shell. Credential expiration time is displayed after login.
Switch credentials
awspss sw
Switch to a different Account/Permission Set using cached token (no re-login). Automatically re-authenticates if the token has expired.
Quick switch (permission set only)
awspss sw AdministratorAccess
Switch 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.
Check current identity
awspss whoami
Displays the current AWS identity (Account, ARN, UserId).
Without shell function (eval)
eval $(awspss login)
eval $(awspss sw)
Verify credentials
aws sts get-caller-identity
aws s3 ls
terraform plan
Clear credentials
awspss unset
Logout (clear cached token)
awspss logout
Removes the cached SSO token. Use this when you want to force a fresh login next time.
Commands
| Command | Description |
|---|---|
awspss init |
Register shell function (auto-add to rc file + activate) |
awspss init --print |
Print shell function only (for manual setup) |
awspss configure |
Configure SSO connection |
awspss login |
SSO login (always re-authenticates) |
awspss sw |
Switch account/permission set (uses cached token) |
awspss sw [ROLE] |
Quick switch permission set (Tab completion supported) |
awspss whoami |
Show current AWS identity |
awspss unset |
Clear AWS credentials from current shell |
awspss logout |
Clear cached SSO token |
Metadata
Release files for awspss 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| awspss-0.3.0.tar.gz | 7.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| awspss-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.8 kB
Release files / awspss-0.3.0.tar.gz
| Download URL | awspss-0.3.0.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c2dde64ef1b092e54d5b98695ceade652cacbc0dfffcec9d01e8609d84d6a1fa
|
|
BLAKE2b-256 checksum How to use checksums |
5a2d4b3fcdc7d1da540efbf9eb976b9bd5f5c57c9bbc77e6866e40d8324f27af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|
Release files / awspss-0.3.0-py3-none-any.whl
| Download URL | awspss-0.3.0-py3-none-any.whl |
|---|---|
| Size | 10.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
32a34dabca76d846b1f3dcb9b21201455f284c46738e31e4a078bf8820f049a6
|
|
BLAKE2b-256 checksum How to use checksums |
357bd4e13020aa3bbdaf29cd5b8f4c2f58c44fb6fc1a3db0227a313ea6c242fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|