LoginSignup
6
4

More than 5 years have passed since last update.

[*AWS*] AWS CLIのインストール&設定メモ

Last updated at Posted at 2019-01-26

はじめに

インストール&設定メモと、エラー解決メモ。
環境はmacOS Mojave

インストール時のエラー

$ curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
$ sudo python get-pip.py
$ sudo pip install awscli
# 以下の3つのエラーが出る
# matplotlib 1.3.1 requires nose, which is not installed.
# matplotlib 1.3.1 requires tornado, which is not installed.
# Cannot uninstall 'six'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

インストール時のエラー解決

# 以下のエラーについて
# matplotlib 1.3.1 requires nose, which is not installed.
# matplotlib 1.3.1 requires tornado, which is not installed.
$ sudo easy_install nose
$ sudo easy_install tornado
# 以下のエラーについて
# Cannot uninstall 'six'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
$ sudo -H pip install awscli --upgrade --ignore-installed six
# これで成功する

ユーザーの追加

AWS CLI用のユーザーがなければAMIから作成する。
アクセスの種類として、プログラムによるアクセスにチェックを入れる。
AWSのコンソールにアクセスできるユーザーにしたい場合はその下にもチェックが必要。
スクリーンショット 2019-01-26 10.09.22.png
今回は一旦フルアクセスを許可しているが、ここは適宜適切なアクセス権の付与が必要
スクリーンショット 2019-01-26 10.10.02.png
ユーザーを追加するとアクセスキーIDシークレットアクセスキーが発行されるのでこれをコピーする。
スクリーンショット 2019-01-26 10.10.28.png

CLI側の設定

$ aws configure
# AWS Access Key ID [None]: XXXXXXXXXXXXXXXX *適宜変更
# AWS Secret Access Key [None]: XXXXXXXXXXXXXXXX *適宜変更
# Default region name [None]: ap-northeast-1 *アジアパシフィック(東京)にした 参考: https://docs.aws.amazon.com/ja_jp/general/latest/gr/rande.html
# Default output format [None]: json
6
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
6
4