Nate
04/04/2024, 5:26 PMMarvin
04/04/2024, 5:26 PMNate
04/04/2024, 5:26 PMNate
04/04/2024, 5:27 PMNate
04/04/2024, 7:34 PMMarvin
04/04/2024, 7:35 PMprefect work-pool create --type ecs my-ecs-pool
2. Start a worker for the pool:
prefect worker start --pool my-ecs-pool
It's also common to deploy the worker as an ECS task. The worker may work without any additional configuration, but this depends on your specific AWS setup. You should review the work pool editor in the Prefect UI to see the available options.
By default, the worker will register a task definition for each flow run and run a task in your default ECS cluster using AWS Fargate, inferring subnets from your default VPC. If you don't have a default VPC, you will need to provide a VPC ID or set up the network configuration manually.
To read more on the Prefect AWS ECS worker setup, you can visit the documentation here.
Please note that if you have a GCP account, and not AWS, the process will be slightly different and you can find the documentation for setting up a worker on GCP here. Ensure you're following the guide that matches your cloud provider.