Skip to content

Commit 54609ca

Browse files
committed
Bug fix on RefreshableCredentials
1 parent a3d7557 commit 54609ca

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

pubweb/clients/s3.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
from boto3 import Session
77
from botocore.credentials import RefreshableCredentials
8+
from botocore.session import get_session
89
from tqdm import tqdm
910

1011
from pubweb.models.auth import Creds
@@ -91,12 +92,13 @@ def _build_session_client(self):
9192
creds = self._creds_getter()
9293

9394
if creds['Expiration']:
94-
session = Session()
95+
session = get_session()
9596
session._credentials = RefreshableCredentials.create_from_metadata(
9697
metadata=format_creds_for_session(creds),
97-
refresh_using=self._refresh_credentials(),
98+
refresh_using=self._refresh_credentials,
9899
method='sts'
99100
)
101+
session = Session(botocore_session=session)
100102
else:
101103
session = Session(
102104
aws_access_key_id=creds['AccessKeyId'],

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
setup(
3535
name='pubweb',
36-
version='0.3.3',
36+
version='0.3.4',
3737
author='Fred Hutch',
3838
license='MIT',
3939
author_email='[email protected]',

0 commit comments

Comments
 (0)