Court
09/09/2025, 4:48 PMCourt
09/09/2025, 4:51 PMCourt
09/09/2025, 7:11 PMMarvin
09/09/2025, 7:11 PMMarvin
09/09/2025, 7:14 PMprefect version
python -V
prefect config view --show-sources
prefect profile inspect
Also, if this is about CLI commands, note that in Prefect 3.x some commands differ from older guides. For example:
- Use prefect deploy
(not prefect deployment build
)
- Use flow.from_source(...).deploy(...)
in code (not Deployment.build_from_flow()
)
CLI reference if helpful: Prefect CLI Reference
Once I have the error text and context, I can suggest a precise fix.Court
09/09/2025, 7:22 PMMarvin
09/09/2025, 7:23 PMMarvin
09/09/2025, 7:27 PMprefect cloud workspace ls
prefect cloud workspace set # if needed
prefect work-pool ls
prefect work-pool inspect "<your-pool-name>"
If the pool doesn’t show up here, it’s likely a workspace mismatch or the pool was deleted; that would cause a NotFound-style error (often reported as code 5).
2) Try the same edit via CLI
- If the pool exists, try updating via CLI to see if the API accepts your change:
- Update description:
prefect work-pool update "<your-pool-name>" --description "New description"
- Set concurrency limit:
prefect work-pool set-concurrency-limit "<your-pool-name>" 5
- If you’re editing the base job template, pull the default for your pool type first and modify carefully:
prefect work-pool get-default-base-job-template --type <pool-type> --file default.json
# edit default.json, then
prefect work-pool update "<your-pool-name>" --base-job-template default.json
If CLI updates work but the UI still errors, it’s likely a UI bug — we can escalate with details.
3) Check permissions
- Ensure your role in the workspace is Admin or Owner; Members may not be able to modify work pools. If you don’t have the right role, ask an Admin/Owner to grant it.
- Roles/permissions guide: Cloud roles and permissions
4) Immutable fields or invalid template
- Pool type is immutable — if you need a different type (e.g., docker → kubernetes), create a new pool:
prefect work-pool create "<new-pool>" --type <pool-type>
- If you’re editing the base job template, ensure valid JSON and that fields match the pool type’s schema. Using the default template as a starting point (step 2) helps.
- Work pools guide: Managing work pools
- CLI reference: Prefect CLI Reference
If it still fails:
- Please share the pool name and type, exactly what field you’re changing, and whether the CLI update succeeds.
- In the browser, open DevTools → Network, find the request to edit the work pool, and copy the response body/error text — that usually includes the precise API error behind “code: 5”.
We’ll get you unblocked quickly once we see whether it’s workspace/permissions vs. a specific validation issue.Court
09/09/2025, 7:43 PMMarvin
09/09/2025, 7:43 PMMarvin
09/09/2025, 7:46 PMprefect cloud workspace ls
prefect work-pool ls
prefect work-pool inspect "my-ecs-pool"
2) Export a template to edit
- If you don’t already have your pool’s current template saved, start from the ECS default:
prefect work-pool get-default-base-job-template --type ecs --file ecs-template.json
Tip: If your pool already has customizations, copy its existing template (from the UI or inspect
output) into a file and edit that instead of starting from the default.
3) Edit ecs-template.json
You can set the cluster in either place below (both are commonly present in the ECS template):
- job_configuration.cluster
- job_configuration.task_run_request.cluster
Set them to your new cluster name (or full ARN), for example:
{
"job_configuration": {
...
"cluster": "my-new-ecs-cluster",
"task_run_request": {
...
"cluster": "my-new-ecs-cluster",
...
},
...
},
"variables": {
...
"properties": {
"cluster": {
...
"default": "my-new-ecs-cluster"
}
}
}
}
Notes:
- Keeping the variables.properties.cluster.default in sync makes the pool default consistent.
- If any deployments override the cluster via job variables, update those too (they take precedence over the pool default).
4) Apply the update
prefect work-pool update "my-ecs-pool" --base-job-template ecs-template.json
5) Verify
prefect work-pool inspect "my-ecs-pool"
Ensure the cluster shows your new value, then run a test deployment to confirm tasks launch on the new cluster.
Helpful references:
- Managing work pools: Managing work pools
- ECS guide (what each field means): ECS integration guide
- CLI reference: Prefect CLI Reference
If you hit an error applying the update, paste the CLI output and (if possible) the relevant part of your JSON and I’ll help spot the schema issue.Court
09/09/2025, 8:35 PMMarvin
09/09/2025, 8:37 PMMarvin
09/09/2025, 8:37 PMprefect work-pool get-default-base-job-template --type ecs --file ecs.json
Edit ecs.json:
{
"variables": {
"properties": {
"cluster": {
"default": "my-new-ecs-cluster"
}
}
}
}
Apply it:
prefect work-pool update "my-ecs-pool" --base-job-template ecs.json
Court
09/10/2025, 1:50 AM