Skip to content

Commit

Permalink
handle mwaa forwarding for LF archive (#20)
Browse files Browse the repository at this point in the history
Co-authored-by: ranchodeluxe <[email protected]>
  • Loading branch information
ranchodeluxe and ranchodeluxe authored Apr 25, 2023
1 parent a9150b6 commit 063aac4
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ def lambda_handler(event, context):
s3_filename_no_ext = os.path.splitext(s3_filename_target)[0]
print(f"[ S3 FILENAME NO EXT ]: {s3_filename_no_ext}")

bucket_key_prefix = "EIS/FEDSoutput/Snapshot/"
if s3_filename_no_ext.startswith("lf_"):
bucket_key_prefix = "EIS/FEDSoutput/LFArchive/"

# get web token
mwaa_cli_token = client.create_cli_token(
Name=mwaa_env_name
Expand All @@ -28,7 +32,7 @@ def lambda_handler(event, context):
serialized_args = json.dumps({
"discovery": "s3",
"collection": s3_filename_no_ext,
"prefix": "EIS/FEDSoutput/Snapshot/",
"prefix": bucket_key_prefix,
"bucket": "veda-data-store-staging",
"filename_regex": f"^(.*){s3_filename_target}$",
"vector": True
Expand Down

0 comments on commit 063aac4

Please sign in to comment.