LoginSignup
0
0

More than 1 year has passed since last update.

AWS CLIのバージョンを1から2へとアップデートする

Posted at

ゴール

AWS CLIのバージョンを1から2にアップデートする
※使用しているOSはmac

手順

  1. V1アンインストール
  2. V2インストール

という手順で行う

現在のバージョン確認

$ aws --version
aws-cli/1.18.132 Python/2.7.16 Darwin/19.3.0 botocore/1.17.55

現在のバージョンは1.18.132である

V1アンインストール

以下の2コマンドを実施

$ sudo rm -rf /usr/local/aws
$ sudo rm /usr/local/bin/aws

確認

$ aws --version
zsh: command not found: aws

V2インストール

V2の最新バージョンをインストールする

1. pkgファイルをダウンロード

以下のリンクからDLできる
https://awscli.amazonaws.com/AWSCLIV2.pkg

2. インストーラを使用してインストール

ダウンロードしたファイルをダブルクリックして、インストーラを起動
インストーラーの指示に従いインストール
以下の場合を選択できる

  • 全てのユーザー用にインストール
  • 現在のユーザーのみにインストール

今回は「全てのユーザー用にインストール」を選択
ディレクトリはデフォルトで選択されているものを使用
「インストール」ボタンを押すことでインストールが開始される

確認

$ which aws
/usr/local/bin/aws
$ aws --version
aws-cli/2.2.8 Python/3.8.8 Darwin/19.3.0 exe/x86_64 prompt/off

V2がインストールされていることを確認

参考

0
0
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
0
0