Anton L.
07/18/2024, 12:03 PMMarvin
07/18/2024, 12:03 PMaws ecs register-task-definition --cli-input-json <file://task-definition.json>
3. Create ECS Service:
- Create an ECS service to manage your Prefect worker, ensuring it uses your specific ASG as a capacity provider:
aws ecs create-service \
--service-name prefect-worker-service \
--cluster <ecs-cluster> \
--task-definition <task-definition-arn> \
--desired-count 1 \
--network-configuration "awsvpcConfiguration={subnets=[<subnet-ids>],securityGroups=[<security-group-ids>],assignPublicIp='ENABLED'}"
4. Set Up Prefect Push Work Pool:
- Navigate to the work pools page and create a new push work pool with your AWS configuration.
5. Configure Deployment:
- Ensure your deployment is configured to use your new push work pool in your deployment file:
work_pool:
name: my-push-pool
6. Auto-Scaling Configuration:
- Ensure that your capacity provider strategy is set correctly. Do not set a launch type to allow the auto-scaling features to function correctly.
For more detailed guidance, refer to the following resources:
- AWS ECS Integration Guide
- Push Work Pools Guide
- GitHub Issue on ECS Push Pools
These resources should help you get your setup correctly configured and running smoothly on your EC2 auto-scaling group.