boto3-refresh-session 0.0.25__py3-none-any.whl → 0.0.26__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- boto3_refresh_session/session.py +6 -5
- {boto3_refresh_session-0.0.25.dist-info → boto3_refresh_session-0.0.26.dist-info}/METADATA +1 -1
- boto3_refresh_session-0.0.26.dist-info/RECORD +6 -0
- boto3_refresh_session-0.0.25.dist-info/RECORD +0 -6
- {boto3_refresh_session-0.0.25.dist-info → boto3_refresh_session-0.0.26.dist-info}/LICENSE +0 -0
- {boto3_refresh_session-0.0.25.dist-info → boto3_refresh_session-0.0.26.dist-info}/WHEEL +0 -0
boto3_refresh_session/session.py
CHANGED
@@ -22,7 +22,7 @@ from typing import Type
|
|
22
22
|
|
23
23
|
from attrs import define, field
|
24
24
|
from attrs.validators import ge, instance_of, optional
|
25
|
-
from boto3 import Session
|
25
|
+
from boto3 import Session, client
|
26
26
|
from botocore.credentials import (
|
27
27
|
DeferredRefreshableCredentials,
|
28
28
|
RefreshableCredentials,
|
@@ -115,7 +115,9 @@ class AutoRefreshableSession:
|
|
115
115
|
)
|
116
116
|
|
117
117
|
__session._credentials = __credentials
|
118
|
-
self.session = Session(
|
118
|
+
self.session = Session(
|
119
|
+
botocore_session=__session, **self.session_kwargs
|
120
|
+
)
|
119
121
|
|
120
122
|
def _get_credentials(self) -> dict:
|
121
123
|
"""Returns temporary credentials via AWS STS.
|
@@ -126,11 +128,10 @@ class AutoRefreshableSession:
|
|
126
128
|
AWS temporary credentials.
|
127
129
|
"""
|
128
130
|
|
129
|
-
|
130
|
-
__client = __session.client(
|
131
|
+
__sts_client = client(
|
131
132
|
service_name="sts", region_name=self.region, **self.client_kwargs
|
132
133
|
)
|
133
|
-
__temporary_credentials =
|
134
|
+
__temporary_credentials = __sts_client.assume_role(
|
134
135
|
RoleArn=self.role_arn,
|
135
136
|
RoleSessionName=self.session_name,
|
136
137
|
DurationSeconds=self.ttl,
|
@@ -0,0 +1,6 @@
|
|
1
|
+
boto3_refresh_session/__init__.py,sha256=OMY8el4qROyEvo0vr1Kv8rtFU7g3xnjHuBss54XRTEA,135
|
2
|
+
boto3_refresh_session/session.py,sha256=Wdr95s9DQLc-d7JKYOzqoD9q51KsZjENmcJLm4EzsPY,5267
|
3
|
+
boto3_refresh_session-0.0.26.dist-info/LICENSE,sha256=I3ZYTXAjbIly6bm6J-TvFTuuHwTKws4h89QaY5c5HiY,1067
|
4
|
+
boto3_refresh_session-0.0.26.dist-info/METADATA,sha256=6eH1e0ImkvPW9EkDph3a11WgJUeUigKoxKhVOGRedhU,4472
|
5
|
+
boto3_refresh_session-0.0.26.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
|
6
|
+
boto3_refresh_session-0.0.26.dist-info/RECORD,,
|
@@ -1,6 +0,0 @@
|
|
1
|
-
boto3_refresh_session/__init__.py,sha256=OMY8el4qROyEvo0vr1Kv8rtFU7g3xnjHuBss54XRTEA,135
|
2
|
-
boto3_refresh_session/session.py,sha256=nrUQRTGmXJGKvUJbr0nw56lx9Ww3BlDy8ceOoFBA6O0,5292
|
3
|
-
boto3_refresh_session-0.0.25.dist-info/LICENSE,sha256=I3ZYTXAjbIly6bm6J-TvFTuuHwTKws4h89QaY5c5HiY,1067
|
4
|
-
boto3_refresh_session-0.0.25.dist-info/METADATA,sha256=SD2bxPQOrIdvBvxNLrJNWMYHEuA7siG2d_gx7ozbNIA,4472
|
5
|
-
boto3_refresh_session-0.0.25.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
|
6
|
-
boto3_refresh_session-0.0.25.dist-info/RECORD,,
|
File without changes
|
File without changes
|