1. AWS CLI가 설치되어 있지 않다.

$ aws
The program 'aws' is currently not installed. You can install it by typing:
sudo apt install awscli

2. 설치방법

  • apt 설치방법
  • pip 설치방법

3. apt 설치 방법

3.1. 설치

$ sudo apt install awscli
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  docutils-common libjbig0 libjpeg-turbo8 libjpeg8 liblcms2-2 libpaper-utils libpaper1 libtiff5
  libwebp5 libwebpmux1 python3-botocore python3-colorama python3-dateutil python3-docutils
  python3-jmespath python3-pil python3-pygments python3-roman python3-rsa python3-s3transfer
Suggested packages:
  liblcms2-utils texlive-latex-recommended texlive-latex-base texlive-lang-french
  fonts-linuxlibertine | ttf-linux-libertine docutils-doc python-pil-doc python3-pil-dbg
  ttf-bitstream-vera
The following NEW packages will be installed:
  awscli docutils-common libjbig0 libjpeg-turbo8 libjpeg8 liblcms2-2 libpaper-utils libpaper1
  libtiff5 libwebp5 libwebpmux1 python3-botocore python3-colorama python3-dateutil
  python3-docutils python3-jmespath python3-pil python3-pygments python3-roman python3-rsa
  python3-s3transfer
0 upgraded, 21 newly installed, 0 to remove and 11 not upgraded.
Need to get 3,548 kB of archives.
After this operation, 29.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libjpeg-turbo8 amd64 1.4.2-0ubuntu3.1 [111 kB]
Get:2 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 liblcms2-2 amd64 2.6-3ubuntu2 [137 kB]
Get:3 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 libjbig0 amd64 2.1-3.1 [26.6 kB]
Get:4 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu xenial/universe amd64 python3-dateutil all 2.4.2-1 [39.1 kB]
Get:5 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 python3-roman all 2.0.0-2 [8,140 B]
Get:6 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 docutils-common all 0.12+dfsg-1 [141 kB]
Get:7 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 python3-docutils all 0.12+dfsg-1 [346 kB]
Get:8 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu xenial/universe amd64 python3-jmespath all 0.9.0-2 [16.6 kB]
Get:9 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 python3-botoupdate-alternatives: using /usr/share/docutils/scripts/python3/rst-buildhtml to provide /usr/bin/rst-buildhtml (rst-buildhtml) in auto mode
update-alternatives: using /usr/share/docutils/scripts/python3/rst2html to provide /usr/bin/rst2html (rst2html) in auto mode
update-alternatives: using /usr/share/docutils/scripts/python3/rst2latex to provide /usr/bin/rst2latex (rst2latex) in auto mode
update-alternatives: using /usr/share/docutils/scripts/python3/rst2man to provide /usr/bin/rst2man (rst2man) in auto mode
update-alternatives: using /usr/share/docutils/scripts/python3/rst2odt to provide /usr/bin/rst2odt (rst2odt) in auto mode
update-alternatives: using /usr/share/docutils/scripts/python3/rst2odt_prepstyles to provide /usr/bin/rst2odt_prepstyles (rst2odt_prepstyles) in auto mode
update-alternatives: using /usr/share/docutils/scripts/python3/rst2pseudoxml to provide /usr/bin/rst2pseudoxml (rst2pseudoxml) in auto mode
update-alternatives: using /usr/share/docutils/scripts/python3/rst2s5 to provide /usr/bin/rst2s5 (rst2s5) in auto mode
update-alternatives: using /usr/share/docutils/scripts/python3/rst2xetex to provide /usr/bin/rst2xetex (rst2xetex) in auto mode
update-alternatives: using /usr/share/docutils/scripts/python3/rst2xml to provide /usr/bin/rst2xml (rst2xml) in auto mode
update-alternatives: using /usr/share/docutils/scripts/python3/rstpep2html to provide /usr/bin/rstpep2html (rstpep2html) in auto mode
Setting up python3-botocore (1.4.70-1~16.04.0) ...
Setting up python3-s3transfer (0.1.9-1~16.04.0) ...
Setting up awscli (1.11.13-1ubuntu1~16.04.0) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...

3.2. 설치확인

$ aws
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
 
  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: the following arguments are required: command

4. pip 설치 방법

4.1. 설치

$ sudo apt-get install python3-pip
$ pip3 install awscli --upgrade --user

4.2. 설치확인

$ ls -l ~/.local/bin
total 108
drwxrwxr-x 2 ubuntu ubuntu 4096 Oct 29 23:22 __pycache__
-rwxrwxr-x 1 ubuntu ubuntu  815 Oct 29 23:22 aws
-rwxrwxr-x 1 ubuntu ubuntu 1432 Oct 29 23:22 aws.cmd
-rwxrwxr-x 1 ubuntu ubuntu  204 Oct 29 23:22 aws_bash_completer
-rwxrwxr-x 1 ubuntu ubuntu 1136 Oct 29 23:22 aws_completer
-rwxrwxr-x 1 ubuntu ubuntu 1807 Oct 29 23:22 aws_zsh_completer.sh
-rwxrwxr-x 1 ubuntu ubuntu 1675 Oct 29 23:22 jp.py
-rwxrwxr-x 1 ubuntu ubuntu  216 Oct 29 23:22 pyrsa-decrypt
-rwxrwxr-x 1 ubuntu ubuntu  232 Oct 29 23:22 pyrsa-decrypt-bigfile
-rwxrwxr-x 1 ubuntu ubuntu  216 Oct 29 23:22 pyrsa-encrypt
-rwxrwxr-x 1 ubuntu ubuntu  232 Oct 29 23:22 pyrsa-encrypt-bigfile
-rwxrwxr-x 1 ubuntu ubuntu  214 Oct 29 23:22 pyrsa-keygen
-rwxrwxr-x 1 ubuntu ubuntu  237 Oct 29 23:22 pyrsa-priv2pub
-rwxrwxr-x 1 ubuntu ubuntu  210 Oct 29 23:22 pyrsa-sign
-rwxrwxr-x 1 ubuntu ubuntu  214 Oct 29 23:22 pyrsa-verify
-rwxrwxr-x 1 ubuntu ubuntu  594 Oct 29 23:22 rst2html.py
-rwxrwxr-x 1 ubuntu ubuntu  714 Oct 29 23:22 rst2html4.py
-rwxrwxr-x 1 ubuntu ubuntu 1140 Oct 29 23:22 rst2html5.py
-rwxrwxr-x 1 ubuntu ubuntu  791 Oct 29 23:22 rst2latex.py
-rwxrwxr-x 1 ubuntu ubuntu  600 Oct 29 23:22 rst2man.py
-rwxrwxr-x 1 ubuntu ubuntu  764 Oct 29 23:22 rst2odt.py
-rwxrwxr-x 1 ubuntu ubuntu 1698 Oct 29 23:22 rst2odt_prepstyles.py
-rwxrwxr-x 1 ubuntu ubuntu  601 Oct 29 23:22 rst2pseudoxml.py
-rwxrwxr-x 1 ubuntu ubuntu  637 Oct 29 23:22 rst2s5.py
-rwxrwxr-x 1 ubuntu ubuntu  871 Oct 29 23:22 rst2xetex.py
-rwxrwxr-x 1 ubuntu ubuntu  602 Oct 29 23:22 rst2xml.py
-rwxrwxr-x 1 ubuntu ubuntu  670 Oct 29 23:22 rstpep2html.py