AWS Identity Center Permission Sets Switcher
Project description
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 |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file awspss-0.3.0.tar.gz.
File metadata
- Download URL: awspss-0.3.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2dde64ef1b092e54d5b98695ceade652cacbc0dfffcec9d01e8609d84d6a1fa
|
|
| MD5 |
e8126b3d5a5525d5e0535f421ef92f22
|
|
| BLAKE2b-256 |
5a2d4b3fcdc7d1da540efbf9eb976b9bd5f5c57c9bbc77e6866e40d8324f27af
|
File details
Details for the file awspss-0.3.0-py3-none-any.whl.
File metadata
- Download URL: awspss-0.3.0-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32a34dabca76d846b1f3dcb9b21201455f284c46738e31e4a078bf8820f049a6
|
|
| MD5 |
7a62c385956e5325e619aa308a9c4a68
|
|
| BLAKE2b-256 |
357bd4e13020aa3bbdaf29cd5b8f4c2f58c44fb6fc1a3db0227a313ea6c242fc
|