Scott Vermillion
08/08/2021, 6:16 PMKevin Kho
Scott Vermillion
08/08/2021, 8:00 PMKevin Kho
# pass the full event
inputs['parameters'] = dict(event=event)
# or just the bucket name
inputs['parameters'] = dict(bucket_name=event['Records'][0]['s3']['bucket']['name'])
You would just need to get the s3 file instead of the bucket so it becomes:
inputs['parameters'] = dict(file_path=event['Records'][0]['s3']['object']['key'])
or something like that?
I don’t know what the full event looks like so this is just a guess based on this .
And then on the Prefect side, you would accept it as
with Flow(...) as flow:
file_path = Parameter("file_path")
And then file_path
will take the value for the file_path you passed inScott Vermillion
08/08/2021, 8:14 PM