# Buildkite agents are locked to AWS CLI v1

**URL:** <https://forum.buildkite.community/t/buildkite-agents-are-locked-to-aws-cli-v1/1675>\
**Category:** General\
**Created:** [August 5, 2021, 2:08pm UTC](https://forum.buildkite.community/t/buildkite-agents-are-locked-to-aws-cli-v1/1675 "2021-08-05T14:08:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![snasirca](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/snasirca/32/935_2.png) [@snasirca](https://forum.buildkite.community/u/snasirca)\
**Post date:** [August 5, 2021, 2:08pm UTC](https://forum.buildkite.community/t/buildkite-agents-are-locked-to-aws-cli-v1/1675/1 "2021-08-05T14:08:08Z")

</div>

Hi,

We’re trying to simplify our invocations of the AWS CLI commands in our pipeline shell scripts. We’d like to remove the need to supply the `--region` flag. AWS CLI v2 doesn’t require this if the `AWS_REGION` environment variable has been set. But going through the code, I see that the Buildkite agents are locked into v1 of the `awscli` package. What is the upgrade plan for getting to v2? Are there workarounds/alternatives for us being able to use v2 for our environment?

---

<div class="post-metadata">

**Author:** ![paula](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/paula/32/954_2.png) [@paula](https://forum.buildkite.community/u/paula)\
**Post date:** [August 5, 2021, 9:14pm UTC](https://forum.buildkite.community/t/buildkite-agents-are-locked-to-aws-cli-v1/1675/2 "2021-08-05T21:14:37Z")

</div>

Hi @snasirca!

Welcome to the community! 😊

If you are using our [Elastic Stack](https://github.com/buildkite/elastic-ci-stack-for-aws), `awscli` package it’s [upgraded](https://github.com/buildkite/elastic-ci-stack-for-aws/blob/bffd4505e92f7fd2d5f028ed9a004545d894699d/packer/linux/scripts/install-utils.sh#L10) to the last version (for Linux) when the AMI is built. If you are using Windows, it is stuck at the moment at [version 1.18.11](https://github.com/buildkite/elastic-ci-stack-for-aws/blob/bffd4505e92f7fd2d5f028ed9a004545d894699d/packer/windows/scripts/install-utils.ps1#L11). We don’t have a timeline on when we are going to upgrade for Windows, but I’m going to let our engineers know about this.

Cheers!

---

<div class="post-metadata">

**Author:** ![snasirca](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/snasirca/32/935_2.png) [@snasirca](https://forum.buildkite.community/u/snasirca)\
**Post date:** [August 9, 2021, 11:02am UTC](https://forum.buildkite.community/t/buildkite-agents-are-locked-to-aws-cli-v1/1675/3 "2021-08-09T11:02:28Z")

</div>

Hi Paula,

I upgraded to the latest version of the Elastic Stack but have the same issue. We’re using Linux AMIs and I see the line of code that does the installation of the AWS CLI. But the version I observe during a build is still V1.

---

<div class="post-metadata">

**Author:** ![paula](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/paula/32/954_2.png) [@paula](https://forum.buildkite.community/u/paula)\
**Post date:** [August 9, 2021, 4:17pm UTC](https://forum.buildkite.community/t/buildkite-agents-are-locked-to-aws-cli-v1/1675/4 "2021-08-09T16:17:46Z")

</div>

Hey,

Could you contact [support@buildkite.com](mailto:support@buildkite.com) and send a link to a build so we can have a better look? Thanks!
