--- id: aws-sso-lib version: "1.14.0" license: Apache-2.0 license_treatment: permissive maintenance: aging --- # aws-sso-lib — Library to make AWS SSO easier License: permissive · Maintenance: aging · Downloads: 152.0K/mo ## What it is and what it does aws-sso-lib is a Python library that wraps AWS IAM Identity Center (formerly AWS SSO) to make programmatic authentication and role discovery easier. It provides functions to log users in interactively, obtain boto3 sessions for specific accounts and roles, list available accounts and roles a user has access to, and (for administrators) iterate over all Identity Center assignments—tasks that would otherwise require manual AWS API calls or configuration. The library depends on boto3 and aws-error-utils, and is designed to work across Python 3.7 through 3.11. It handles credential caching, browser-based login flows with fallback options, and token expiry management, making it practical for scripts that need to assume roles programmatically without hardcoding credentials or requiring manual profile setup. Use it for: - Automate AWS role assumption in deployment or CI/CD scripts without storing long-lived credentials. - Build internal tools that discover and list all available AWS accounts and roles a user can access. - Write multi-account AWS management scripts where the account and role are baked into the code rather than AWS config files. - Implement custom authentication flows for AWS applications that need to work with Identity Center without managing separate credential stores. - Admin scripts that audit or iterate over all Identity Center assignments across accounts and permission sets. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Programmatically interact with AWS IAM Identity Center to obtain boto3 sessions, log in users, and discover available accounts and roles. Yes, if you need programmatic AWS Identity Center integration. Low install friction, permissive license, and no known vulnerabilities make it safe to adopt. However, the aging maintenance status (last release 2023-01-27) means you should verify compatibility with your boto3 version and current Identity Center API before relying on it for new projects; consider checking the repository for any recent fixes or community forks if you encounter issues. ## Install pip install aws-sso-lib uv add aws-sso-lib poetry add aws-sso-lib ## Installing aws-sso-lib Before you install: Low install friction with only two runtime dependencies (boto3 and aws-error-utils). Maintenance status is aging—last release was 2023-01-27, over two years ago, though the repository remains active with a recent commit in 2025-08-26 and moderate community engagement (1053 stars). License in practice: Licensed under Apache-2.0 (permissive), which allows commercial and private use with minimal restrictions; suitable for most projects. Quickstart: pip install aws-sso-lib import aws_sso_lib # Log in to Identity Center aws_sso_lib.login('https://my-start-url.awsapps.com/start', 'us-east-2') # Get a boto3 session for a specific account and role session = aws_sso_lib.get_boto3_session( start_url='https://my-start-url.awsapps.com/start', sso_region='us-east-2', account_id='ACCOUNT_ID', role_name='ROLE_NAME', region='us-east-1' ) Verify before relying: - Whether the package is actively maintained or in maintenance-only mode given the 2+ year gap since last release - Compatibility with recent AWS Identity Center API changes or breaking changes in boto3 ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 152.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags aws identity center programmatic access, aws sso boto3 session, aws identity center login automation, list aws sso roles accounts, aws iam identity center python, aws sso credential management, identity center permission set discovery, aws-integration, identity-management, credential-handling [View on SkillFed](https://skillfed.io/packages/aws-sso-lib) · [View on PyPI](https://pypi.org/project/aws-sso-lib/)