https://prefect.io logo
k

Kenneth Miller

05/08/2021, 5:49 PM
Hi everyone - I'm currently evaluating using Prefect/Dask for our ETL engine, running through our various use-cases - reading through the open-source docs I'm wondering if there is a simple way to trigger execution of a task from the outside, say, from an AWS lambda function written in Javascript...any ideas?
Also, wondering how much latency would be involved...
k

Kevin Kho

05/08/2021, 5:49 PM
Hi @Kenneth Miller ! Yes you can trigger Prefect Flows using the GraphQL API
I can’t speak on exact latency but it’s pretty lightweight. It’s just a matter of hitting the end point.
k

Kenneth Miller

05/08/2021, 5:57 PM
Oh, nice...I see
Copy code
mutation {
  create_flow_run(input: { 
  flow_id: "<flow id>", 
  parameters: "{\"a\":2}" 
  }) {
    id
  }
}
k

Kevin Kho

05/08/2021, 5:57 PM
Yes exactly
k

Kenneth Miller

05/08/2021, 5:58 PM
Looks like there is idempotency support too - awesome.
Thanks so much for your quick response @Kevin Kho - big help! Have a nice weekend!
👍 1