Is it possible to deploy a prefect flow using aws lambda to ec2

Is it possible to deploy a prefect flow from aws lambda to ec2 instance where prefect is installed using python sdk(I am using prefect opensource version 2.10.4)

I am not totally clear on your question but I would advise reviewing our tutorial and installing a worker on EC2. Prefect can not schedule flows on lambda but can be run in lambda using AWS’ scheduler.

Hi George,

We need some additional help with below Infrastructure.

  1. Prefect Server setup in EC2 instance
  2. Prefect agent setup in ECS Faregate service
  3. WorkFlow files are stored in S3 bucket

Now we are trying to deploy Flow and schedule them through Lambda function due to we want to use Prefect SDK deploy functionality instead of REST API. In AWS Lambda function execution we are getting “[Errno -2] Name or service not known” error, so we need additional help what do we need to configure in Lambda function to make this deployment process work.