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).
--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.
-Installing AWS CLI version 2 on Linux
Recommended Posts