Skip to content

Commit

Permalink
chore: added optional credential parameter to pass s3 account
Browse files Browse the repository at this point in the history
  • Loading branch information
usama101 committed Sep 26, 2024
1 parent 95ce5ca commit 021e1ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion edx_prefectutils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Top-level package for edx-prefectutils.
"""

__version__ = '2.4.2'
__version__ = '2.4.3'
5 changes: 3 additions & 2 deletions edx_prefectutils/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def get_s3_path_for_date(date):


@task
def write_report_to_s3(download_results: tuple, s3_bucket: str, s3_path: str):
def write_report_to_s3(download_results: tuple, s3_bucket: str, s3_path: str, credentials: dict = None):
logger = prefect.context.get("logger")

date, report_str = download_results
Expand All @@ -83,7 +83,8 @@ def write_report_to_s3(download_results: tuple, s3_bucket: str, s3_path: str):

s3.S3Upload(bucket=s3_bucket).run(
report_str,
key=s3_key
key=s3_key,
credentials=credentials
)

return date_path
Expand Down

0 comments on commit 021e1ef

Please sign in to comment.