Skip to content

Commit

Permalink
Tdl-27000 add credentials_cache_path property (#70)
Browse files Browse the repository at this point in the history
* update JSONFileCache to use /tmp dir
-----------------------------

Co-authored-by: Leslie VanDeMark <[email protected]>

* version bump and changelog update
-----------------------------

Co-authored-by: Leslie VanDeMark <[email protected]>

* make JSONFileCache a config value, defaulting to the functions CACHE_DIR
-----------------------------

Co-authored-by: Leslie VanDeMark <[email protected]>

* minor version bump
-----------------------------

Co-authored-by: Leslie VanDeMark <[email protected]>

---------

Co-authored-by: Kristiana Gerxhi <[email protected]>
  • Loading branch information
leslievandemark and kgerxhi authored Feb 5, 2025
1 parent ea2c2fe commit f355e49
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 1.5.0
* Changes JSONFileCache location [#70](https://github.com/singer-io/tap-s3-csv/pull/70)

## 1.4.0
* Adds proxy AWS Account support
* [#69](https://github.com/singer-io/tap-s3-csv/pull/69)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from setuptools import setup

setup(name='tap-s3-csv',
version='1.4.0',
version='1.5.0',
description='Singer.io tap for extracting CSV files from S3',
author='Stitch',
url='https://singer.io',
Expand Down
5 changes: 3 additions & 2 deletions tap_s3_csv/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ def setup_aws_client_with_proxy(config):
proxy_role_arn = "arn:aws:iam::{}:role/{}".format(config['proxy_account_id'].replace('-', ''),
config['proxy_role_name'])
cust_role_arn = "arn:aws:iam::{}:role/{}".format(config['account_id'].replace('-', ''), config['role_name'])
credentials_cache_path = config.get("credentials_cache_path", JSONFileCache.CACHE_DIR)

# Step 1: Assume Role in Account Proxy and set up refreshable session
session_proxy = Session()
Expand All @@ -132,7 +133,7 @@ def setup_aws_client_with_proxy(config):
'DurationSeconds': 3600,
'RoleSessionName': 'ProxySession'
},
cache=JSONFileCache()
cache=JSONFileCache(credentials_cache_path)
)

# Refreshable credentials for Account Proxy
Expand All @@ -153,7 +154,7 @@ def setup_aws_client_with_proxy(config):
'RoleSessionName': 'TapS3CSVCustSession',
'ExternalId': config['external_id']
},
cache=JSONFileCache()
cache=JSONFileCache(credentials_cache_path)
)

# Set up refreshable session for Customer Account
Expand Down

0 comments on commit f355e49

Please sign in to comment.