Skip to main content

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.

awspss demo

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:

  1. Detect your shell rc file (.bashrc or .zshrc)
  2. Ask for confirmation
  3. 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


Download files

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

Source Distribution

awspss-0.3.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

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

awspss-0.3.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

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

Hashes for awspss-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c2dde64ef1b092e54d5b98695ceade652cacbc0dfffcec9d01e8609d84d6a1fa
MD5 e8126b3d5a5525d5e0535f421ef92f22
BLAKE2b-256 5a2d4b3fcdc7d1da540efbf9eb976b9bd5f5c57c9bbc77e6866e40d8324f27af

See more details on using hashes here.

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

Hashes for awspss-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 32a34dabca76d846b1f3dcb9b21201455f284c46738e31e4a078bf8820f049a6
MD5 7a62c385956e5325e619aa308a9c4a68
BLAKE2b-256 357bd4e13020aa3bbdaf29cd5b8f4c2f58c44fb6fc1a3db0227a313ea6c242fc

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