Triggering a Prefect workflow externally

只谈情不闲聊 提交于 2021-01-27 06:01:30

问题


I currently have a Prefect workflow running locally on an EC2 instance. I can trigger my workflow on localhost:8080 through the UI. Is there a way to trigger a Prefect workflow externally (say AWS Lambda) via REST API or some other way?

I know that Airflow supports an experimental REST API.


回答1:


Yes through REST API you can trigger it using AWS Lambda, and can schedule AWS Lambda trigger using CloudWatch Events Rule, it supports both fixed rate or crown expression scheduler




回答2:


Yes, Prefect exposes a full GraphQL API that you can use to perform all types of actions, including the scheduling / triggering of a workflow. This blog post goes into more detail, and here is some code for setting up an AWS Lambda function to trigger Prefect flow runs.



来源:https://stackoverflow.com/questions/63256062/triggering-a-prefect-workflow-externally

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!