Tad
02/20/2026, 11:35 AMMarvin
02/20/2026, 11:35 AMMarvin
02/20/2026, 11:37 AMexecution_role_arn and task_definition_arn (also task_role_arn if you need a task role).
- Precedence:
1) Work pool defaults (lowest)
2) Deployment job_variables in prefect.yaml (override pool)
3) Flow run job_variables at runtime (highest)
- You cannot “reference” pool variables from within prefect.yaml. To use the pool’s values, just omit those keys from the deployment.
Example (inherits from the ECS pool; nothing hardcoded):
deployments:
- name: my-ecs-deployment
entrypoint: flows/my_flow.py:my_flow
work_pool:
name: my-ecs-pool
# No job_variables here — will use the pool's execution_role_arn and task_definition_arn
If you need to override for this deployment:
deployments:
- name: my-ecs-deployment
entrypoint: flows/my_flow.py:my_flow
work_pool:
name: my-ecs-pool
job_variables:
execution_role_arn: "arn:aws:iam::123456789012:role/ecsTaskExecutionRole"
task_definition_arn: "arn:aws:ecs:us-east-1:123456789012:task-definition/my-task:1"
If you prefer not to hardcode, you can inject via environment variables when building/deploying:
deployments:
- name: my-ecs-deployment
entrypoint: flows/my_flow.py:my_flow
work_pool:
name: my-ecs-pool
job_variables:
execution_role_arn: "{{ $EXECUTION_ROLE_ARN }}"
task_definition_arn: "{{ $TASK_DEFINITION_ARN }}"
Want me to sanity-check your pool’s current variables or your prefect.yaml? Feel free to paste them (with any sensitive bits redacted).