3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AWS CLIをMACにインストールする

Posted at

はじめに

自分のMACにAWS CLIを設定した時のメモになります。
詳しくはここの通り。そのまま実行しただけです。

概要

  1. pythonバージョンの確認
  2. ダウンロード
  3. インストール
  4. パスを通す
  5. コンフィグ設定

詳細


1. pythonバージョンの確認

Python使用するみたいですのでバージョンの確認をします。

$ python --version
Python 2.7.10

2. ダウンロード

ダウンロードしてunzipをします。

$ wget https://s3.amazonaws.com/aws-cli/awscli-bundle.zip
$ unzip awscli-bundle.zip
Archive:  awscli-bundle.zip
  inflating: awscli-bundle/install   
  inflating: awscli-bundle/packages/awscli-1.11.11.tar.gz  
  inflating: awscli-bundle/packages/jmespath-0.9.0.tar.gz  
  inflating: awscli-bundle/packages/simplejson-3.3.0.tar.gz  
  inflating: awscli-bundle/packages/ordereddict-1.1.tar.gz  
  inflating: awscli-bundle/packages/s3transfer-0.1.9.tar.gz  
  inflating: awscli-bundle/packages/rsa-3.4.2.tar.gz  
  inflating: awscli-bundle/packages/futures-3.0.5.tar.gz  
  inflating: awscli-bundle/packages/docutils-0.12.tar.gz  
  inflating: awscli-bundle/packages/colorama-0.3.7.zip  
  inflating: awscli-bundle/packages/argparse-1.2.1.tar.gz  
  inflating: awscli-bundle/packages/pyasn1-0.1.9.tar.gz  
  inflating: awscli-bundle/packages/virtualenv-13.0.3.tar.gz  
  inflating: awscli-bundle/packages/botocore-1.4.68.tar.gz  
  inflating: awscli-bundle/packages/python-dateutil-2.5.3.tar.gz  
  inflating: awscli-bundle/packages/six-1.10.0.tar.gz  

3. インストール

AWS CLIをインストールします。

$ sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
Password:
Running cmd: /usr/bin/python virtualenv.py --python /usr/bin/python /usr/local/aws
Running cmd: /usr/local/aws/bin/pip install --no-index --find-links file:///Users/hara/awscli-bundle/packages awscli-1.11.11.tar.gz
You can now run: /usr/local/bin/aws --version

4. パスを通す

実行しやすいようにパスを通します。

$ vim ~xxx/.bash_profile
export PATH=/usr/local/aws/bin:$PATH
$ source ~xxx/.bash_profile
$ aws help

5. コンフィグ設定

AWS CLIのコンフィグを設定します。

$ aws configure
AWS Access Key ID [None]: XXXXXXXXXXXXXXXXXXX
AWS Secret Access Key [None]: XXXXXXXXXXXXXXXXXXX
Default region name [None]: ap-northeast-1
Default output format [None]: ENTER
3
3
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
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?