LoginSignup
37
28

More than 3 years have passed since last update.

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

Last updated at Posted at 2020-03-24

はじめに

AWS CLIバージョン2をMacにインストールします。(バージョン1のときのように、pipの事前導入などが不要となりました)

事前準備

AWS CLIバージョン1が先に導入されている場合は、awsコマンドへのパスに注意が必要です。バージョン1をアンインストールするか、シンボリックリンクでの工夫が必要です。

手順

AWS CLIのインストール

  1. https://awscli.amazonaws.com/AWSCLIV2.pkg からインストーラーのダウンロード
  2. インストーラー(pkgファイル)をダブルクリックして実行し、インストール手順に従ってインストールする
  3. ターミナルを起動し、$ which awsでawsコマンドが実行できるかを確認する

AWS CLIの構成

  1. ホームディレクトリでconfigの起動 $ aws configure
  2. アクセスキー、シークレットアクセスキー、リージョン名を入れる
$ aws configure
AWS Access Key ID [None]: xxxxxxxx
AWS Secret Access Key [None]: xxxxxxxxxxxxxxxx
Default region name [None]: ap-northeast-1
Default output format [None]: 

ホームディレクトリ直下に.awsというフォルダが作成され、その下に、configとcredentialsというファイルが作成される。

アップグレード

再度インストーラをダウンロードして同じ手順で上書きインストールします。

37
28
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
37
28