Just getting around to testing / migrating to worker pools. I am wondering if there is a way to have the same step run on different worker pools depending on which environment I am deploying to. So for example, we have 2 separate AWS accounts for Prod vs. Non-Prod. We have a step that runs a CloudFormation template and we are using IAM roles to give the workers permission to deploy the template. So when we are deploying to the Prod account we need to use the Prod worker, Non-Prod uses Non-Prod worker, etc.
Thanks for getting in touch! This is a great question, and while it’s not currently possible to directly scope a worker pool to an environment, there is a way to work around this to reach the same behavior by taking advantage of the magic of cloud regions.
What you’ll need are cloud regions to map to environments, and scope your step to run on this cloud region to execute the work. I’ve set up an example below to help visualize how this works.
The configuration of my cloud region:
My step is scoped to that role:
When deploying to
Development, the resulting log reports
Leased worker Dev Worker from pool Dev Region (lease WorkerTaskLeases-3), and promoting to
Leased worker Test Worker from pool Test Region (lease WorkerTaskLeases-4).
I hope this helps for the time being! Scoping worker pools to environments is something we totally agree should be possible, and it’s something we’re currently in the process of implementing. This will make it much easier in the future.
Let me know if there’s anything else I can assist with in any way.
Thanks for that. This will work for the moment. I do look forward to the ability to scope to the environment process.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.