The Docker image that comes with AWS CLI installed still uses v1 (1.2.17 as of this writing). If you want to use v2, you’ll need to install it.

Here’s how:

install-aws-cli-v2:
  - step:
      name: Install AWS CLI v2
      clone:
        enabled: false
      image: atlassian/default-image:3
      script:
        - curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" 
        - unzip awscliv2.zip
        - ./aws/install 
        - aws --version

It’s that easy.

Thanks for reading. ✊🏿