NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI
PyPI, #4913 most downloaded on PyPI
A boto3 session manager: cached clients, typed client properties for 400+ AWS services, assume role with auto-refresh, and AWS CLI credential handoff.
Latest stable
2.1.1
Last release 1 months ago
18 Oct 2026
Ships unpredictably
gaps range from 1 weeks to 1.2 years
Nearly every release is documented
notes for 23 of 23 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
23 releases · first in 2022
Drag across the ruler to compare, or tap a release to open it.
Fixed BotoSesManager.aws_account_alias on an account without an alias: it raised IndexError instead of returning None.
Bugfixes
Fixed BotoSesManager.aws_account_alias on an account without an alias: it raised IndexError instead of returning None.
BotoSesManager.print_who_am_i() no longer fails because of the account alias: it prints <not set> when the account has no alias, and <unavailable: AccessDenied> (or the other error code) when the caller may not call iam:ListAccountAliases. The aws_account_alias property still raises the error, and does not cache it.
Dropped Python 3.10, which reached end of life this month: requires-python is now >=3.11. Python 3.10 users keep getting 2.0.1.
Breaking Changes
Dropped Python 3.10, which reached end of life this month: requires-python is now >=3.11. Python 3.10 users keep getting 2.0.1.
Removed the services that are no longer listed in the boto3 documentation: AwsServiceEnum.IoTEvents, AwsServiceEnum.IoTEventsData, AwsServiceEnum.Panorama and AwsServiceEnum.SimSpaceWeaver, with their iotevents_client, ioteventsdata_client, panorama_client and simspaceweaver_client properties. Code that still needs them can call bsm.get_client("iotevents") and the like, as long as the installed boto3 supports them.
Features and Improvements
Added 17 AWS services to AwsServiceEnum, each with its typed <name>_client property, e.g. LambdaCore (bsm.lambdacore_client), EventBridgeV2, AgentRegistry, CloudWatchOmni and ResilienceHubV2. Creating these clients needs a boto3 release that knows the service.
Bugfixes
Fixed BotoSesManager.assume_role(external_id=...): without auto_refresh=True the external id was sent to STS as external_id instead of ExternalId, so every call that passed it failed with a parameter validation error.
Miscellaneous
The tests now run against a real AWS account, locally and on CI, with a dedicated IAM user and two IAM roles (one requiring an external id), created by the new mise run setup-aws-ci and removed by mise run teardown-aws-ci. They replace the CDK stack and the .env file. Every assume_role argument and the AWS CLI integration of awscli() are now tested.
Added mise run codegen to regenerate services.py and clients.py from the boto3 documentation.
Renamed the Claude Code agent skill that teaches agents how to use this library from .claude/skills/bsm to .claude/skills/pypi-boto_session_manager, now generated by pywf-oss-write-pypi-skill. Copy that directory into your project's .claude/skills/ to use it.
Upgraded the project to the pywf open-source template 2.0.0: pywf-oss-* maintenance skills, mise run format and mise run lint, newer GitHub Actions, httpx2 instead of httpx for the maintenance tasks, pytest 9, Sphinx 8 and newer docs dependencies.
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Public API namespace changed: use from boto_session_manager.api import BotoSesManager instead of from boto_session_manager import BotoSesManager. All
💥Breaking Changes
Public API namespace changed: use from boto_session_manager.api import BotoSesManager instead of from boto_session_manager import BotoSesManager. All public symbols are now exported through the boto_session_manager.api module.
Features and Improvements
Updated all AWS service clients to include every service available as of 2026-04-24.
Added automated code-generation script (scripts/codegen/RUN_crawl_and_generate.py) to crawl official boto3 documentation and regenerate service client code, making future updates trivial.
Added .claude/skills/bsm — a portable Claude Code agent skill that teaches any coding agent how to use this library. Copy the skill directory into your project's .claude/skills/ to enable AI-assisted development with boto_session_manager.
Minor Improvements
Updated type hints to use Python 3.10+ syntax (e.g., X | None instead of Optional[X]).
Modernized sentinel implementation to use Python 3 style.
Migrated build system from setup.py / requirements*.txt to pyproject.toml with uv package manager.
Added mise.toml for development task management and tool version pinning.
Added comprehensive API reference documentation (Sphinx autodoc).
Miscellaneous
Significantly expanded test coverage and improved test infrastructure.
Added CDK infrastructure for automated IAM test user provisioning.
Added CI workflow improvements.
Project is now considered fully stable.
Add support for a lot more AWS Service (primarily bedrock stuff).
Features and Improvements
Add support for a lot more AWS Service (primarily bedrock stuff).
fix a bug that the ~boto_session_manager.manager.BotoSesManager.clear_cache method does not work properly.
Bugfixes
fix a bug that the ~boto_session_manager.manager.BotoSesManager.clear_cache method does not work properly.
add ~boto_session_manager.manager.BotoSesManager.create_boto_ses method.
Features and Improvements
add ~boto_session_manager.manager.BotoSesManager.create_boto_ses method.
add ~boto_session_manager.manager.BotoSesManager.to_snapshot method.
add ~boto_session_manager.manager.BotoSesManager.from_snapshot method.
add ~boto_session_manager.manager.BotoSesManager.from_snapshot_file method.
add ~boto_session_manager.manager.BotoSesManager.temp_snapshot method.
add PATH_DEFAULT_SNAPSHOT constant to public API.
add support and test for 3.11, 3.12.
drop support for 3.6. test only covers 3.7+, older versions may still work.
Minor Improvements
add support for some edge case for the ~boto_session_manager.manager.BotoSesManager.awscli method. Also identified that duration_seconds, serial_number and token_code arguments should not be used in this method. It should set the credential as it is, it should not create a new session, these arguments will be removed in 2024-03-31
Miscellaneous
Improve doc string.
add ~boto_session_manager.manager.BotoSesManager.aws_account_user_id property method.
Features and Improvements
add ~boto_session_manager.manager.BotoSesManager.aws_account_user_id property method.
add ~boto_session_manager.manager.BotoSesManager.masked_aws_account_user_id property method.
add ~boto_session_manager.manager.BotoSesManager.masked_aws_account_id property method.
add ~boto_session_manager.manager.BotoSesManager.principal_arn property method.
add ~boto_session_manager.manager.BotoSesManager.masked_principal_arn property method.
add ~boto_session_manager.manager.BotoSesManager.aws_account_alias property method.
add ~boto_session_manager.manager.BotoSesManager.print_who_am_i method.
AWS occasionally updates the boto3 client name on their website, making some of the old bsm.${service_name}_client unavailable. We add alias for those
Miscellaneous
AWS occasionally updates the boto3 client name on their website, making some of the old bsm.${service_name}_client unavailable. We add alias for those old service name to maintain backward compatibility.
Add sagemaker_a2i_runtime_client alias.
fix bug that the ~boto_session_manager.manager.BotoSesManager.awscli method doesn't work properly when using profile name, or using IAM role on EC2, l
Bugfixes
fix bug that the ~boto_session_manager.manager.BotoSesManager.awscli method doesn't work properly when using profile name, or using IAM role on EC2, lambda, etc...
add region_name argument for ~boto_session_manager.manager.BotoSesManager.assume_role method. If it is not given, then reuse the AWS region of the bas
Minor Improvements
add region_name argument for ~boto_session_manager.manager.BotoSesManager.assume_role method. If it is not given, then reuse the AWS region of the base session.
Add auto refreshable session support (beta). Note that it is using AssumeRoleCredentialFetcher and DeferredRefreshableCredentials from botocore, which
Features and Improvements
Add auto refreshable session support (beta). Note that it is using AssumeRoleCredentialFetcher and DeferredRefreshableCredentials from botocore, which is not public API officially supported by botocore.
Minor Improvements
Use Sentinel NOTHING instead of None to remove the ambiguity of None value.
Add boto3 as explicit dependency.
Miscellaneous
Add boto3 as explicit dependency.
Change license from MIT to Apache 2.0
Fix a bug that the client object cannot locate the right boto3 stubs.
Bugfixes
Fix a bug that the client object cannot locate the right boto3 stubs.
Now all the client and it's methods support auto complete and type hint. You have to do pip install "boto3-stubs[all]" to enable "Client method auto c
Features and Improvements
Now all the client and it's methods support auto complete and type hint. You have to do pip install "boto3-stubs[all]" to enable "Client method auto complete" and "Arguments type hint" features.
Bugfixes
Fix a bug that ~boto_session_manager.manager.BotoSesManager.awscli()` context manager doesn't work properly.
Add boto3 documentation link in doc string
Features and Improvements
Add boto3 documentation link in doc string
Allow to call ~boto_session_manager.manager.BotoSesManager.clear_cache() to clear all cached boto session and client.
Features and Improvements
Allow to call ~boto_session_manager.manager.BotoSesManager.clear_cache() to clear all cached boto session and client.
Add ton's of property method to access the cached boto client.
Update the list of AWS service to the latest (as of 2022-12-10), which are 333 services.
Now boto_session_manager doesn't force to install boto3 when installing itself. You have to manage your boto3 installation separately.
Miscellaneous
Now boto_session_manager doesn't force to install boto3 when installing itself. You have to manage your boto3 installation separately.
Add ~boto_session_manager.manager.BotoSesManager.awscli context manager to pass boto session credential to AWS CLI.
Features and Improvements
Add ~boto_session_manager.manager.BotoSesManager.awscli context manager to pass boto session credential to AWS CLI.
Add delta arguments for ~boto_session_manager.manager.BotoSesManager.is_expired method. allow to check if the session will expire in X seconds.
Features and Improvements
The first API stable version
Minor Improvements
Add delta arguments for ~boto_session_manager.manager.BotoSesManager.is_expired method. allow to check if the session will expire in X seconds.
Add default_client_kwargs argument for boto_session_manager.manager.BotoSesManager.
Features and Improvements
Add default_client_kwargs argument for boto_session_manager.manager.BotoSesManager.
Miscellaneous
Use localstack for unit test.
Add additional keyword arguments for boto_session_manager.manager.BotoSesManager.get_client method
Features and Improvements
Add additional keyword arguments for boto_session_manager.manager.BotoSesManager.get_client method
Now the public API becomes boto_session_manager.manager.BotoSesManager
Features and Improvements
Now the public API becomes boto_session_manager.manager.BotoSesManager
Add boto_session_manager.manager.BotoSesManager.get_resource method
Add boto_session_manager.manager.BotoSessionManager class
Features and Improvements
First release
Add boto_session_manager.manager.BotoSessionManager class
Add boto_session_manager.services.BotoSessionManager class
One column per quarter.