Jason Wiener
07/22/2026, 10:51 PMMarvin
07/22/2026, 10:51 PMMarvin
07/22/2026, 10:53 PMwork_pool.job_variables, but the exact keys depend on the worker type.
For Kubernetes work pools, use request/limit fields:
yaml
deployments:
- name: my-deployment
entrypoint: flows/my_flow.py:my_flow
work_pool:
name: my-k8s-pool
job_variables:
cpu_request: "500m"
cpu_limit: "1"
memory_request: "512Mi"
memory_limit: "1Gi"
For ECS work pools, use cpu and `memory`:
yaml
deployments:
- name: my-deployment
entrypoint: flows/my_flow.py:my_flow
work_pool:
name: my-ecs-pool
job_variables:
cpu: 1024
memory: 2048
A few important caveats:
- These keys must exist in the work pool’s base job template or the override won’t do anything.
- The valid names/formats are worker-specific:
- Kubernetes: cpu_request, cpu_limit, memory_request, memory_limit
- ECS: cpu, memory
- Kubernetes values use K8s resource syntax like "500m" or "1Gi".
If you want to verify what variables your pool supports, inspect the default/base template for that worker type. The relevant CLI is:
prefect work-pool get-default-base-job-template --type <worker-type>
Docs:
- Work pools and job variables
- prefect.yaml reference
If you tell me which work pool type you’re using (kubernetes, ecs, docker, etc.), I can give you the exact YAML snippet for that pool.