Owen Boyd
12/05/2025, 6:03 PMMarvin
12/05/2025, 6:03 PMMarvin
12/05/2025, 6:12 PMecs-pool to a new pool (e.g., ecs-pool-copy).
1) Get the current pool’s details (type + base job template)
prefect work-pool inspect "ecs-pool"
- Note the pool type (for ECS it’s typically ecs).
- Copy the “Base job template” section into a file, e.g. ecs-base.json.
Tip: If you prefer to export it programmatically, you can use the client:
import asyncio, json
from prefect.client.orchestration import get_client
async def main():
async with get_client() as client:
pool = await client.read_work_pool_by_name("ecs-pool")
with open("ecs-base.json", "w") as f:
json.dump(pool.base_job_template, f, indent=2)
print("type:", pool.type)
print("concurrency_limit:", pool.concurrency_limit)
print("description:", pool.description)
asyncio.run(main())
2) Create the new pool with the same type and base job template
prefect work-pool create "ecs-pool-copy" --type ecs --base-job-template ecs-base.json
- If your local environment doesn’t recognize the ECS type, run with AWS extras installed:
uv run --with 'prefect[aws]' prefect work-pool create "ecs-pool-copy" --type ecs --base-job-template ecs-base.json
3) Copy over limits/metadata (if you use them)
prefect work-pool update "ecs-pool-copy" --concurrency-limit <LIMIT> --description "..."
4) (Optional) Recreate the queues from the old pool
- List queues on the original pool:
prefect work-queue ls -p "ecs-pool" --verbose
- For each queue you want to copy, create it in the new pool (preserving limits/priority if needed):
prefect work-queue create "<queue-name>" -p "ecs-pool-copy" --limit <LIMIT> --priority <PRIORITY>
5) Start a worker for the new pool when you’re ready
prefect worker start --pool "ecs-pool-copy"
Would you like me to provide a small script that copies the pool and all its queues end-to-end? If so, what would you like the new pool to be named?