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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: boto3-refresh-session
3
- Version: 0.0.25
3
+ Version: 0.0.26
4
4
  Summary: A simple Python package for refreshing boto3 sessions automatically.
5
5
  Home-page: https://github.com/michaelthomasletts/boto3-refresh-session
6
6
  License: MIT
@@ -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(botocore_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
- __session = Session(region_name=self.region, **self.session_kwargs)
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 = __client.assume_role(
134
+ __temporary_credentials = __sts_client.assume_role(
134
135
  RoleArn=self.role_arn,
135
136
  RoleSessionName=self.session_name,
136
137
  DurationSeconds=self.ttl,
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "boto3-refresh-session"
3
- version = "0.0.25"
3
+ version = "0.0.26"
4
4
  description = "A simple Python package for refreshing boto3 sessions automatically."
5
5
  authors = [
6
6
  {name = "Mike Letts",email = "michaelthomasletts@gmail.com"}