Hi Maikel, thanks a lot for your response!!! You encouraged me to try again :) It turned out that my problem was that I was running the flow with FargateTaskEnvironment. This caused plenty of errors and turned out to be not necessary. In the end, I got it running perfectly by just setting the LocalEnvironment with label corresponding to my agent "fargate" as argument to my flow Object:


This way I was able to connect my flow to the Fargate Agent (which I run by: prefect agent start fargate -t MYRUNNERTOKEN -n fargate -f -l fargate) without having to specify any custom FargateTaskEnvironment.

I'm also curios: how do you start your agent(s)? Do you have an extra EC2 instance where those agents run somewhere as background processes?

Data Engineer, M.Sc. in BI, AWS Certified Solution Architect: www.annageller.com. Get my articles via email: https://annageller.medium.com/subscribe