Skip to main content

ssof

Simple CLI tool to manage AWS SSO sessions across multiple organizations. Configure once per org, then just ssof assume <account> and you're in.

Install

pip install ssof

# Enable shell completion (bash/zsh/fish)
eval "$(ssof completion bash)"   # add to ~/.bashrc

For local development:

uv sync
eval "$(uv run ssof completion bash)"   # add to ~/.bashrc

Usage

# Configure an org
ssof config add my-org

# List cached accounts
ssof list

# Assume a role (interactive picker if no account given)
ssof assume my-account

# By account ID
ssof assume 123456789012

# With specific role
ssof assume my-account --role AdminRole

# Refresh cached accounts
ssof refresh

# Check current session status
ssof status

Commands

Command Description
ssof config add <org> Add an SSO org configuration
ssof config remove <org> Remove an SSO org
ssof assume <account> Assume a role and configure AWS credentials
ssof list List configured orgs and cached accounts
ssof refresh Refresh cached accounts
ssof status Check current credentials status
ssof console Open AWS console in browser
ssof logout Clear default AWS profile

Multi-Org

ssof config add company-prod
ssof config add company-dev

When multiple orgs are configured, ssof assume prompts for account selection across all of them.

How it works

  1. ssof config add stores your SSO start URL and region
  2. Authenticates via browser and caches all accounts
  3. ssof assume gets temporary credentials and writes to ~/.aws/credentials
  4. Backs up previous session automatically

Config stored in ~/.ssof/config.json.

Important: this tool modifies your AWS files

ssof assume, ssof logout, and switching to a backed-up profile write directly to ~/.aws/credentials and ~/.aws/config using Python's configparser. That means:

  • Comments and formatting in those files are not preserved. If you hand-edit ~/.aws/credentials or ~/.aws/config (comments, blank lines, custom ordering), configparser will silently drop comments on the next write. The first time ssof ever writes to either file, it saves a pristine, untouched copy to ~/.ssof/backups/credentials.original and ~/.ssof/backups/config.original respectively (owner-readable only), so the original is always recoverable — but the live file itself will lose that formatting.
  • Profiles ssof doesn't touch are preserved. Other [profile] sections in your credentials/config files are left alone.
  • ~/.aws/credentials is kept at chmod 600 (owner read/write only) after every write, matching the AWS CLI's own convention for that file, since it holds long-lived or temporary secret keys.

Requirements

  • Python 3.10+
  • boto3, click, questionary

License

MIT — see LICENSE.

Metadata

Release files for ssof 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ssof 0.2.0
File Size Uploaded
ssof-0.2.0.tar.gz 16.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ssof 0.2.0
File Interpreter ABI Platform
ssof-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.6 kB

Release files / ssof-0.2.0.tar.gz

Download URL ssof-0.2.0.tar.gz
Size 16.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3ff26e16459fb85d0b456ebc643bbe16dc6fbf50d9c4e76cd02b5f3e5d16dbe6
BLAKE2b-256 checksum
How to use checksums
8b0bf42dc18122b6a2f577bbd02d06ab8f91c9babc54fcff66840786cfa142c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release files / ssof-0.2.0-py3-none-any.whl

Download URL ssof-0.2.0-py3-none-any.whl
Size 14.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd9362afaa7ce3733ad379a3b5229a488f15ca070077b389aba33c47a4aa3f5f
BLAKE2b-256 checksum
How to use checksums
4608353f8fa660f1173ad5a67d614f0c843bdfd564f88a4b3444df37a74aab4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page