CoreOSにAWS CLIをインストール

## pythonのインストール

ActivePythonをダウンロードして展開

```
# cd /tmp/
# wget http://downloads.activestate.com/ActivePython/releases/3.6.0.3600/ActivePython-3.6.0.3600-linux-x86_64-glibc-2.3.6-401834.tar.gz
# tar zxvf ActivePython-3.6.0.3600-linux-x86_64-glibc-2.3.6-401834.tar.gz 
# cd ActivePython-3.6.0.3600-linux-x86_64-glibc-2.3.6-401834
```

インストールスクリプトの実行

```
# ./install.sh 
Enter directory in which to install ActivePython. Leave blank and
press 'Enter' to use the default [/opt/ActivePython-3.6].
Install directory: 

Installing ActivePython to '/opt/ActivePython-3.6'...
Relocating dir-dependent files...
Pre-compiling .py files in the standard library...

ActivePython has been successfully installed to:

    /opt/ActivePython-3.6
    
You can add the following to your .bashrc (or equivalent)
to put ActivePython on your PATH:

    export PATH=/opt/ActivePython-3.6/bin:$PATH

The documentation is available here:

    /opt/ActivePython-3.6/doc/python3.6/index.html
    web: http://docs.activestate.com/activepython/3.6

Please send us any feedback you might have or log bugs here:

    activepython-feedback@ActiveState.com
    http://bugs.activestate.com/ActivePython/

Thank you for using ActivePython.

Do you want to download a free trial of Komodo IDE? [Y/n]
n
coreos ActivePython-3.6.0.3600-linux-x86_64-glibc-2.3.6-401834 # 
```

## AWS CLIのインストール

pipを利用してAWS CLIをインストール

```
$ /opt/ActivePython-3.6/bin/pip3 install awscli --upgrade --user
Collecting awscli
  Downloading awscli-1.14.16-py2.py3-none-any.whl (1.2MB)
    100% |################################| 1.2MB 575kB/s                                                                                                   
Collecting PyYAML<=3.12,>=3.10 (from awscli)
  Downloading PyYAML-3.12.tar.gz (253kB)
    100% |################################| 256kB 4.4MB/s                                                                                                   
Collecting rsa<=3.5.0,>=3.1.2 (from awscli)
  Downloading rsa-3.4.2-py2.py3-none-any.whl (46kB)
    100% |################################| 51kB 4.6MB/s                                                                                                    
Collecting s3transfer<0.2.0,>=0.1.12 (from awscli)
  Downloading s3transfer-0.1.12-py2.py3-none-any.whl (59kB)
    100% |################################| 61kB 4.8MB/s                                                                                                    
Collecting docutils>=0.10 (from awscli)
  Downloading docutils-0.14-py3-none-any.whl (543kB)
    100% |################################| 552kB 1.6MB/s                                                                                                   
Collecting colorama<=0.3.7,>=0.2.5 (from awscli)
  Downloading colorama-0.3.7-py2.py3-none-any.whl
Collecting botocore==1.8.20 (from awscli)
  Downloading botocore-1.8.20-py2.py3-none-any.whl (4.0MB)
    100% |################################| 4.0MB 324kB/s                                                                                                   
Collecting pyasn1>=0.1.3 (from rsa<=3.5.0,>=3.1.2->awscli)
  Downloading pyasn1-0.4.2-py2.py3-none-any.whl (71kB)
    100% |################################| 71kB 4.6MB/s                                                                                                    
Collecting jmespath<1.0.0,>=0.7.1 (from botocore==1.8.20->awscli)
  Downloading jmespath-0.9.3-py2.py3-none-any.whl
Collecting python-dateutil<3.0.0,>=2.1 (from botocore==1.8.20->awscli)
  Downloading python_dateutil-2.6.1-py2.py3-none-any.whl (194kB)
    100% |################################| 194kB 5.7MB/s                                                                                                   
Collecting six>=1.5 (from python-dateutil<3.0.0,>=2.1->botocore==1.8.20->awscli)
  Downloading six-1.11.0-py2.py3-none-any.whl
Building wheels for collected packages: PyYAML
  Running setup.py bdist_wheel for PyYAML ... done
  Stored in directory: /home/lancers/.cache/pip/wheels/2c/f7/79/13f3a12cd723892437c0cfbde1230ab4d82947ff7b3839a4fc
Successfully built PyYAML
Installing collected packages: PyYAML, pyasn1, rsa, jmespath, docutils, six, python-dateutil, botocore, s3transfer, colorama, awscli
Successfully installed PyYAML-3.12 awscli-1.14.16 botocore-1.8.20 colorama-0.3.7 docutils-0.14 jmespath-0.9.3 pyasn1-0.4.2 python-dateutil-2.6.1 rsa-3.4.2 s3transfer-0.1.12 six-1.11.0
```

aws configure

```
$ ~/.local/bin/aws configure --profile myawsprof
AWS Access Key ID [None]: XXXXXXXXXXXXXXXX
AWS Secret Access Key [None]: XXXXXXXXXXXXXXXX
Default region name [None]: ap-northeast-1
Default output format [None]: json
```

※TODO:PATHを通す

### 参考にした記事

https://gist.github.com/osterman/526f7f14148e2068104a2b9ded9d7010
http://docs.aws.amazon.com/ja_jp/cli/latest/userguide/awscli-install-linux.html