AWS CLIをインストールする

# はじめに
PC買い替えによりAWS CLIの再インストールが必要となったため、手順をメモしておく。

# インストール手順
- Linuxにインストールしたいため、以下公式ドキュメントを参考にインストールする。<br>
https://docs.aws.amazon.com/ja_jp/cli/latest/userguide/install-linux.html

# pipインストール
* 以下コマンドを実行してパッケージをインストール。

```shell
# curl -O https://bootstrap.pypa.io/get-pip.py
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1733k  100 1733k    0     0  1152k      0  0:00:01  0:00:01 --:--:-- 1153k
#
```

```shell
# python get-pip.py
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting pip
/tmp/tmpmFVf6o/pip.zip/pip/_vendor/urllib3/util/ssl_.py:365: SNIMissingWarning: An HTTPS request has been made, but the SNI (Server Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see 

・・・（省略）・・・

Collecting wheel
  Downloading https://files.pythonhosted.org/packages/00/83/b4a77d044e78ad1a45610eb88f745be2fd2c6d658f9798a15e384b7d57c9/wheel-0.33.6-py2.py3-none-any.whl
Installing collected packages: pip, wheel
Successfully installed pip-19.2.2 wheel-0.33.6
/tmp/tmpmFVf6o/pip.zip/pip/_vendor/urllib3/util/ssl_.py:149: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
#
```

* インストール確認。

```shell
# pip --version
pip 19.2.2 from /usr/lib/python2.7/site-packages/pip (python 2.7)
#
```

# AWS CLIインストール
* pipを使用してAWS CLIをインストール。

```shell
# pip install awscli
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting awscli

・・・（省略）・・・

  Downloading https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Building wheels for collected packages: PyYAML
  Building wheel for PyYAML (setup.py) ... done
  Created wheel for PyYAML: filename=PyYAML-5.1.2-cp27-cp27mu-linux_x86_64.whl size=44875 sha256=e84f3e8cd7774e2a183283ac18aa20e290d8ab155d1c83d32fb4971bb6d376d0
  Stored in directory: /root/.cache/pip/wheels/d9/45/dd/65f0b38450c47cf7e5312883deb97d065e030c5cca0a365030
Successfully built PyYAML
Installing collected packages: colorama, pyasn1, rsa, docutils, PyYAML, futures, urllib3, six, python-dateutil, jmespath, botocore, s3transfer, awscli
Successfully installed PyYAML-5.1.2 awscli-1.16.220 botocore-1.12.210 colorama-0.3.9 docutils-0.14 futures-3.3.0 jmespath-0.9.4 pyasn1-0.4.6 python-dateutil-2.8.0 rsa-3.4.2 s3transfer-0.2.1 six-1.12.0 urllib3-1.25.3
#
```

* インストール確認。

```shell
# aws --version
aws-cli/1.16.220 Python/2.7.5 Linux/3.10.0-229.el7.x86_64 botocore/1.12.210
#
```

# AWS CLI設定
* aws configureコマンドでシークレットキー諸々登録して終了。

# 参考
* https://qiita.com/yuyj109/items/3163a84480da4c8f402c