Hi! I'm running prefect agent with Azure VM, sugge...
# best-practices
a
Hi! I'm running prefect agent with Azure VM, suggestions to save cost of the idle VM (I only need like 20 minutes nightly to run the flows)? Some built in functionality of Prefect that can help boot/shutdown to match with jobs
k
The VM for the agent doesn’t need to be powerful. You can try agentless execution instead with Azure functions
Copy code
prefect run --project project_name --name flow_name --execute
a
Depends no? In my case I do the actual ETL in Python (for now)
k
Ah I see, so for Local Agent, the agent runs the job, but you can also submit jobs to a Kubernetes cluster instead. In that case, the agent can be minimal. The
--execute
flag will run on the same machine. So if it fits in an Azure Function, maybe you can try that
a
I am using DockerAgent but your point should be the same. My data volume is currently low so probably don't need a cluster, but I guess kubeternetes should scale better
k
Yeah for AWS, we have the ECS agent which is a serverless container, but we don’t have an equivalent for Azure
a
That would be useful, a tutorial with an example deployment on Azure with Prefect would be great to have at some point
k
There is a write-up here
👀 1