boto3-refresh-session 0.0.25__tar.gz → 0.0.26__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {boto3_refresh_session-0.0.25 → boto3_refresh_session-0.0.26}/PKG-INFO +1 -1
- {boto3_refresh_session-0.0.25 → boto3_refresh_session-0.0.26}/boto3_refresh_session/session.py +6 -5
- {boto3_refresh_session-0.0.25 → boto3_refresh_session-0.0.26}/pyproject.toml +1 -1
- {boto3_refresh_session-0.0.25 → boto3_refresh_session-0.0.26}/LICENSE +0 -0
- {boto3_refresh_session-0.0.25 → boto3_refresh_session-0.0.26}/README.md +0 -0
- {boto3_refresh_session-0.0.25 → boto3_refresh_session-0.0.26}/boto3_refresh_session/__init__.py +0 -0
{boto3_refresh_session-0.0.25 → boto3_refresh_session-0.0.26}/boto3_refresh_session/session.py
RENAMED
@@ -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,
|
File without changes
|
File without changes
|
{boto3_refresh_session-0.0.25 → boto3_refresh_session-0.0.26}/boto3_refresh_session/__init__.py
RENAMED
File without changes
|