Skip to content

Commit

Permalink
Merge pull request #12 from Vzzarr/add-aws-session-token
Browse files Browse the repository at this point in the history
adding aws_session_token to config
  • Loading branch information
crowemi authored Apr 21, 2023
2 parents 1c0f90c + ed88c11 commit 7be1bca
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions sample-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions target_s3/formats/format_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
)
Expand Down
6 changes: 6 additions & 0 deletions target_s3/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7be1bca

Please sign in to comment.