[CentOS7] Install aws cli regardless of python version

Premise

aws cli has v1 and v2. v2 no longer requires python, so you don't have to worry about versions. Click here for how to install v1 (https://qiita.com/samichi_valley/items/58b42de4151ee8b13af0).

Installation

--Check commands before installation

$ aws --version
-bash: aws:Command not found

--Check python version

$ ll /usr/bin/python*
lrwxrwxrwx.1 root root 7 September 10 22:29 /usr/bin/python -> python2
lrwxrwxrwx.1 root root 9 September 10 22:29 /usr/bin/python2 -> python2.7
-rwxr-xr-x.1 root root 7136 November 6 2016/usr/bin/python2.7

--Installation

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

--Check the version after installation

$ aws --version
aws-cli/2.0.47 Python/3.7.3 Linux/3.10.0-514.el7.x86_64 exe/x86_64.centos.7

Contains aws cliv2. Also, it seems that you are using python3.7.

--Check python version

$ ll /usr/bin/python*
lrwxrwxrwx.1 root root 7 September 10 22:29 /usr/bin/python -> python2
lrwxrwxrwx.1 root root 9 September 10 22:29 /usr/bin/python2 -> python2.7
-rwxr-xr-x.1 root root 7136 November 6 2016/usr/bin/python2.7

python contains only 2.7.

reference

-Installing AWS CLI version 2 on Linux

Recommended Posts

[CentOS7] Install aws cli regardless of python version
[CentOS7] Install aws cli
Install Python 3 on CentOS 7
Introducing AWS CLI to CentOS 7
AWS CLI install in Ubuntu 20.04
Install an older version of Docker for Mac
Install the latest version of Jenkins on Ubuntu 16
Install MariaDB (CentOS 8)
[CentOS] Install apache-loggen
Install docker-compose on a Graviton 2 instance of AWS EC2
How to install the root certificate of Centos7 (Cybertrust)
[CentOS] Download and build the specified version of Git
Install MySQL 5.6 on CentOS6 [How to specify the version]