13

sudo apt install awscli installs currently version 1.16.113-1

The official website (https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html) supports aarch64 but not armhf. Is there another way or something that I am missing. The differences between v1 and v2 are not that big but for example v1 does not support --storage-class DEEP_ARCHIVE

ECII
  • 10,297
  • 18
  • 80
  • 121

4 Answers4

12

Got this to work on a Raspberry Pi 2 by checking out and installing directly from the awscli v2 branch on github.

You'll need to run a modern python (3.6+?), so the whole procedure is isolated in its own venv so as not to mess up system python.

Based roughly on these directions https://github.com/aws/aws-cli/tree/v2#cli-dev-version we get:

$ git clone https://github.com/aws/aws-cli.git
$ cd aws-cli && git checkout v2
$ pip3 install -r requirements.txt
$ pip3 install .

$ aws --version
aws-cli/2.1.14 Python/3.9.1 Linux/4.19.66+ source/armv6l.raspbian.9 prompt/off
James Beard
  • 166
  • 2
  • 6
  • I've just tried this on a Raspberry Pi 3, and even though every command seemed to work, I don't get an `aws` command, it just says 'command not found' – Pablote Feb 16 '21 at 04:16
  • 1
    I had to run `pip3 install https://github.com/boto/botocore/zipball/v2#egg=botocore --upgrade` manually and then was able to run the `pip3 install -r requirements` and `pip3 install .` @Pablote for me, the install path is `$HOME/.local/bin` make sure that is in your `$PATH` and you should be good. – Rob Sutherland Feb 18 '21 at 00:05
  • These steps worked well for my Pi2 with Raspbian 10 (buster) Lite installed. No need for @RobSutherland 's additional steps above, for me. – Joseph Van Riper Nov 05 '21 at 14:37
  • Good deal Joseph. I don’t recall the version of Raspbian Inwas on so it could be that or some other dependencies that you already had installed, but I didn’t. Glad it worked for you. It was close for me obviously. – Rob Sutherland Nov 06 '21 at 17:12
  • Just tested on RPi4 and 32bit Raspberry OS. Works just fine (though there is no need to checkout `v2` branch anymore). As a side note, Raspberry OS 64bit just got released and for this one I would expect the official arm64 build (`awscli-exe-linux-aarch64.zip`) to work too. – Mchl Feb 03 '22 at 20:13
-1

You can install this now from an official download here: https://aws.amazon.com/blogs/developer/aws-cli-v2-now-available-for-linux-arm/

-1

PI 4 Raspberry PI OS Lite 64bit 256 SSD

if you don't switch to v2 you'll be on develop branch which is still v1.n

sudo apt update && sudo apt upgrade -y

sudo reboot

sudo apt install git -y

sudo apt install pip -y

git clone https://github.com/aws/aws-cli.git

cd aws-cli

git switch v2

pip install -r requirements.txt

pip install .

sudo reboot

aws --version

aws configure --profile profileName

...
    
aws s3 ls
-4

aws cli v2 is still not available in the Python Package Index(PyPI) repository. I have passed the instruciton below for "How to install aws cli v2"

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install

how to configure aws cli v2 command line completion permanently

complete -C '/usr/local/bin/aws_completer' aws
echo "complete -C '/usr/local/bin/aws_completer' aws" >>  ~/.bashrc 
source ~/.bashrc  

now you can check by typing any partial command and press the tab key aws s<TAB>

linux.cnf
  • 519
  • 6
  • 7
  • 1
    This question is about Raspberry Pi specifically, which uses ARM chips. The URL that you list: "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" seems to be about x86 chips. Will this binary run on ARM architecture if I download it? – SteveCalifornia Jul 18 '21 at 02:20