Help us understand the problem. What is going on with this article?

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

More than 3 years have passed since last update.

はじめに

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

http://docs.aws.amazon.com/cli/latest/userguide/installing.html#install-bundle-other-os

概要

  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

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away