@Bianca Hoch Got it Bianca, thanks a lot!
For the above set-up, I'm using a simple test script.
However, my intended use case is for training of various Machine Learning models, where some may require more resources like GPU.
I think it will be very costly to keep an ec2 GPU instance running and polling the Prefect Server.
Ideally, when the request comes in, depending on the job, the right amount of resource and the worker will be spinned up. The worker executes the run, and then gets terminated after to save cost.
It seems that using a push work pool and ECS with different task definitions might work. However, if i'm not wrong, push work pool only works with Prefect Cloud. We may need to set this up on-prem, so we'll need to self-host the Prefect Server and need to use an ECS alternative like Kubernetes.
Do you have any recommendations for this?