boto3-refresh-session 1.3.3__py3-none-any.whl → 1.3.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- boto3_refresh_session/__init__.py +1 -1
- {boto3_refresh_session-1.3.3.dist-info → boto3_refresh_session-1.3.5.dist-info}/METADATA +4 -36
- {boto3_refresh_session-1.3.3.dist-info → boto3_refresh_session-1.3.5.dist-info}/RECORD +6 -6
- {boto3_refresh_session-1.3.3.dist-info → boto3_refresh_session-1.3.5.dist-info}/LICENSE +0 -0
- {boto3_refresh_session-1.3.3.dist-info → boto3_refresh_session-1.3.5.dist-info}/NOTICE +0 -0
- {boto3_refresh_session-1.3.3.dist-info → boto3_refresh_session-1.3.5.dist-info}/WHEEL +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: boto3-refresh-session
|
3
|
-
Version: 1.3.
|
3
|
+
Version: 1.3.5
|
4
4
|
Summary: A simple Python package for refreshing the temporary security credentials in a boto3.session.Session object automatically.
|
5
5
|
License: MIT
|
6
6
|
Keywords: boto3,botocore,aws
|
@@ -83,8 +83,10 @@ Description-Content-Type: text/markdown
|
|
83
83
|
- Supports automatic credential refresh methods for various AWS services:
|
84
84
|
- STS
|
85
85
|
- ECS
|
86
|
-
- Supports
|
86
|
+
- Supports custom authentication methods for complicated authentication flows
|
87
|
+
- Natively supports all parameters supported by `boto3.session.Session`
|
87
88
|
- Tested, documented, and published to PyPI
|
89
|
+
- Future releases will include support for EC2, IoT, SSO, and OIDC
|
88
90
|
|
89
91
|
## Recognition, Adoption, and Testimonials
|
90
92
|
|
@@ -98,12 +100,6 @@ A testimonial from a Cyber Security Engineer at a FAANG company:
|
|
98
100
|
|
99
101
|
> _Most of my work is on tooling related to AWS security, so I'm pretty choosy about boto3 credentials-adjacent code. I often opt to just write this sort of thing myself so I at least know that I can reason about it. But I found boto3-refresh-session to be very clean and intuitive [...] We're using the RefreshableSession class as part of a client cache construct [...] We're using AWS Lambda to perform lots of operations across several regions in hundreds of accounts, over and over again, all day every day. And it turns out that there's a surprising amount of overhead to creating boto3 clients (mostly deserializing service definition json), so we can run MUCH more efficiently if we keep a cache of clients, all equipped with automatically refreshing sessions._
|
100
102
|
|
101
|
-
The following line plot illustrates the adoption of BRS over the last three months in terms of average daily downloads over a rolling seven day window.
|
102
|
-
|
103
|
-
<p align="center">
|
104
|
-
<img src="https://raw.githubusercontent.com/michaelthomasletts/boto3-refresh-session/refs/heads/main/doc/downloads.png" />
|
105
|
-
</p>
|
106
|
-
|
107
103
|
## Installation
|
108
104
|
|
109
105
|
```bash
|
@@ -148,31 +144,3 @@ session = brs.RefreshableSession(
|
|
148
144
|
s3 = session.client(service_name='s3')
|
149
145
|
buckets = s3.list_buckets()
|
150
146
|
```
|
151
|
-
|
152
|
-
## Raison d'être
|
153
|
-
|
154
|
-
Long-running data pipelines, security tooling, ETL jobs, and cloud automation scripts frequently interact with the AWS API using boto3 — and often run into the same problem:
|
155
|
-
|
156
|
-
**Temporary credentials expire.**
|
157
|
-
|
158
|
-
When that happens, engineers typically fall back on one of two strategies:
|
159
|
-
|
160
|
-
- Wrapping AWS calls in try/except blocks that catch ClientError exceptions
|
161
|
-
- Writing ad hoc logic to refresh credentials using botocore credentials internals
|
162
|
-
|
163
|
-
Both approaches are fragile, tedious to maintain, and error-prone at scale.
|
164
|
-
|
165
|
-
Over the years, I noticed that every company I worked for — whether a scrappy startup or FAANG — ended up with some variation of the same pattern:
|
166
|
-
a small in-house module to manage credential refresh, written in haste, duplicated across services, and riddled with edge cases. Things only
|
167
|
-
got more strange and difficult when I needed to run things in parallel.
|
168
|
-
|
169
|
-
Eventually, I decided to build boto3-refresh-session as a proper open-source Python package:
|
170
|
-
|
171
|
-
- Fully tested
|
172
|
-
- Extensible
|
173
|
-
- Integrated with boto3 idioms
|
174
|
-
- Equipped with automatic documentation and CI tooling
|
175
|
-
|
176
|
-
**The goal:** to solve a real, recurring problem once — cleanly, consistently, and for everyone - with multiple refresh strategies.
|
177
|
-
|
178
|
-
If you've ever written the same AWS credential-refresh boilerplate more than once, this library is for you.
|
@@ -1,11 +1,11 @@
|
|
1
|
-
boto3_refresh_session/__init__.py,sha256=
|
1
|
+
boto3_refresh_session/__init__.py,sha256=D0r3Nr19lp_qzLeinuCSE-7G9iq2hBj-_hMgLlktRvw,200
|
2
2
|
boto3_refresh_session/custom.py,sha256=ZnN94A69Eku9L-kHZ7JJxn_aWbrt6mJDWOIEWrJrIcY,3229
|
3
3
|
boto3_refresh_session/ecs.py,sha256=WIC5mlbcEnM1oo-QXmmtiw2mjFDn01hBfcFh67ku42A,3713
|
4
4
|
boto3_refresh_session/exceptions.py,sha256=qcFzdIuK5PZirs77H_Kb64S9QFb6cn2OJtirjvaRLiY,972
|
5
5
|
boto3_refresh_session/session.py,sha256=ak8lvgoHMObaJgL4c80ih4bptRHS3ASojnaWdbxn5kA,5246
|
6
6
|
boto3_refresh_session/sts.py,sha256=paIgbmn9a3cATNX-6AEGxnSGNZnX1pj4rRQmh8gQSKs,3132
|
7
|
-
boto3_refresh_session-1.3.
|
8
|
-
boto3_refresh_session-1.3.
|
9
|
-
boto3_refresh_session-1.3.
|
10
|
-
boto3_refresh_session-1.3.
|
11
|
-
boto3_refresh_session-1.3.
|
7
|
+
boto3_refresh_session-1.3.5.dist-info/LICENSE,sha256=I3ZYTXAjbIly6bm6J-TvFTuuHwTKws4h89QaY5c5HiY,1067
|
8
|
+
boto3_refresh_session-1.3.5.dist-info/METADATA,sha256=mJKnoAJ7RJklmP_zOF7g801DkEw1H-7vNWaRpqVnt64,6271
|
9
|
+
boto3_refresh_session-1.3.5.dist-info/NOTICE,sha256=1s8r33qbl1z0YvPB942iWgvbkP94P_e8AnROr1qXXuw,939
|
10
|
+
boto3_refresh_session-1.3.5.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
11
|
+
boto3_refresh_session-1.3.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|