LoginSignup
5
4

More than 3 years have passed since last update.

AWS CLI v2

Last updated at Posted at 2020-02-26

AWS CLI v2

$ aws logs tail --follow LOG-GROUP-NAME

ロググループを指定して、ログをリアルタイムでtailすることができるのっていいよね。

AWS CLI v2 install

とりあえずpipでinstall

$ pip install -e git://github.com/aws/aws-cli.git@v2#egg=awscli
pyenv: pip: command not found

えっ。そんなわけない。。

pyenvを確認

$ pyenv versions
  system
* 3.6.1 (set by ~~~~~)
  (省略)

うーん。とりあえず早く試したいので、別のバージョンならpip使えるので、バージョン切り替えて、とりあえずすすむ。

$ pyenv global 3.7.6
$ pip install -e git://github.com/aws/aws-cli.git@v2#egg=awscli
(省略)
ERROR: No matching distribution found for botocore==2.0.0dev5 (from awscli)

なんかまたエラー出てきた。
依存ライブラリのbotocoreがうんぬん。

awscliより先にbotocoreを入れてみる。

$ pip install https://github.com/boto/botocore/archive/v2.tar.gz
(省略)
Successfully installed botocore-2.0.0.dev5

よし、成功。

$ pip install https://github.com/boto/botocore/archive/v2.tar.gz
(省略)
Successfully installed awscli cffi-1.14.0 cryptography-2.8 prompt-toolkit-2.0.10 pycparser-2.19 ruamel.yaml-0.15.100 wcwidth-0.1.8

よし。成功。

確認。

$ aws --version
aws-cli/2.0.1 Python/3.7.6 Darwin/19.3.0 botocore/2.0.0dev5

おけおけ。

$ aws logs tail --follow LOG-GROUP-NAME

これで見れた!!

追記

python 3.6.1で pyenv: pip: command not foundって出てきたのが相当気持ち悪い。

結論

$ cd .anyenv/envs/pyenv/versions
$ rm -rf 3.6.1

一回消して

$ pyenv install 3.6.1

入れ直したら、大丈夫だった。なんか気持ち悪いけど、まぁおk。

5
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4