diff --git a/sample-config.json b/sample-config.json index 6243beb..fef1e08 100644 --- a/sample-config.json +++ b/sample-config.json @@ -12,6 +12,7 @@ "aws": { "aws_access_key_id": "test", "aws_secret_access_key": "test", + "aws_session_token": "test", "aws_region": "us-west-2", "aws_profile_name": "test-profile", "aws_bucket": "test-bucket", diff --git a/target_s3/formats/format_base.py b/target_s3/formats/format_base.py index d0c9f65..58d37d2 100644 --- a/target_s3/formats/format_base.py +++ b/target_s3/formats/format_base.py @@ -58,6 +58,7 @@ def __init__(self, config: dict, context: dict, extension: str) -> None: self.session = Session( aws_access_key_id=aws_config.get("aws_access_key_id", None), aws_secret_access_key=aws_config.get("aws_secret_access_key", None), + aws_session_token=aws_config.get("aws_session_token", None), region_name=aws_config.get("aws_region"), profile_name=aws_config.get("aws_profile_name", None), ) diff --git a/target_s3/target.py b/target_s3/target.py index 48d58a5..cb42d75 100644 --- a/target_s3/target.py +++ b/target_s3/target.py @@ -77,6 +77,12 @@ class Targets3(Target): required=False, secret=True, ), + th.Property( + "aws_session_token", + th.StringType, + required=False, + secret=True, + ), th.Property( "aws_region", th.StringType,