# Pipeline-wise agent queue selection

**URL:** <https://forum.buildkite.community/t/pipeline-wise-agent-queue-selection/975>\
**Category:** Features Requests\
**Created:** [April 3, 2020, 11:43pm UTC](https://forum.buildkite.community/t/pipeline-wise-agent-queue-selection/975 "2020-04-03T23:43:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xiaket](https://avatars.discourse-cdn.com/v4/letter/x/7feea3/32.png) [@xiaket](https://forum.buildkite.community/u/xiaket)\
**Post date:** [April 3, 2020, 11:43pm UTC](https://forum.buildkite.community/t/pipeline-wise-agent-queue-selection/975/1 "2020-04-03T23:43:07Z")

</div>

Hi team!

Do we have a way to specify a queue to use at pipeline level, and all the steps will use this queue instead of default? Our use case is we have recently migrated to only allow a special agent(infra) to access some of our AWS accounts, and it is really tedious to redefine the queue for every step.

If not, can I suggest that we read the pipeline agent from an environment variable, so we can either define that at the top level, or we can pass it in from a parent pipeline?

Thanks!

Regards,  
Kai

---

<div class="post-metadata">

**Author:** ![petemounce](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/petemounce/32/339_2.png) [@petemounce](https://forum.buildkite.community/u/petemounce)\
**Post date:** [June 5, 2020, 1:00pm UTC](https://forum.buildkite.community/t/pipeline-wise-agent-queue-selection/975/2 "2020-06-05T13:00:18Z")

</div>

We use named anchors to DRY up our YAML; it works, but only within one pipeline at a time. If there’re more than one pipeline in the same repo, those individually each contain the same boilerplate.
