Skip to content

Add boto3-refresh-session#2906

Closed
michaelthomasletts wants to merge 2 commits intovinta:masterfrom
michaelthomasletts:boto3-refresh-session
Closed

Add boto3-refresh-session#2906
michaelthomasletts wants to merge 2 commits intovinta:masterfrom
michaelthomasletts:boto3-refresh-session

Conversation

@michaelthomasletts
Copy link
Copy Markdown

@michaelthomasletts michaelthomasletts commented Feb 9, 2026

Project

boto3-refresh-session (GitHub)
Official Documentation
PyPI

Checklist

  • One project per PR
  • PR title format: Add project-name
  • Entry format: * [project-name](url) - Description ending with period.
  • Description is concise and short

Why This Project Is Awesome

Which criterion does it meet? (pick one)

  • Industry Standard - The go-to tool for a specific use case
  • Rising Star - 5000+ stars in < 2 years, significant adoption
  • Hidden Gem - Exceptional quality, solves niche problems elegantly

Recognition

Featured in TL;DR Sec

Featured in CloudSec List

What is it?

boto3-refresh-session is a simple Python package with a drop-in replacement for boto3.Session named RefreshableSession. It automatically refreshes temporary AWS credentials, caches clients, and supports MFA token providers. It supports automatic temporary AWS security credential refresh for STS, IOT Core, and custom credential callables. And it is thoroughly tested, regularly updated, comprehensively documentated, and published to PyPI.

Why does it matter? And how does it differ from alternatives?

Although boto3 already supports automatic temporary credential refresh via role assumption as configured in ~/.aws/config, there are scenarios and edge cases where that is insufficient. Below are just a few examples:

  • Profiles or configs are unavailable or impractical (e.g., containerized or serverless environments)
  • You need to explicitly assume roles in a program (not profiles or configs) and hand those credentials around without worrying about expiration
  • Custom credential providers are required (e.g. IOT, external ID, etc.)

boto3-refresh-session exists to fill those gaps (and others not listed) while maintaining full compatibility with boto3.

Although there are other open source tools available which address automatic temporary AWS credential refresh, boto3-refresh-session is ergonomically designed to feel like an extension of boto3 (with a few extra parameters) rather than a separate library with a completely unfamiliar API. Using boto3-refresh-session, you can initialize service clients, resources, collections, etc. from RefreshableSession exactly like you would in boto3. More, the available alternatives to boto3-refresh-session do not support the breadth of features that boto3-refresh-session does, such as client caching, MFA token provider support, or IoT Core X.509 credential refresh, among others. Even if someone doesn't need boto3-refresh-session's core feature (automatic temporary AWS credential refresh), the client caching feature will almost certainly still be useful to them.

@vinta
Copy link
Copy Markdown
Owner

vinta commented Feb 10, 2026

@michaelthomasletts Sorry Mike. While boto3-refresh-session looks well-maintained and documented, but this feels a bit too niche for the list. Going to pass on this one.

@vinta vinta closed this Feb 10, 2026
@michaelthomasletts
Copy link
Copy Markdown
Author

I understand. Thanks for your consideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants