AWS Session Managerプラグインをインストールする方法

環境
Windows10 Pro 22H2
PowerShell
AWS EC2

操作方法
1.PowerShellを起動します。

2.以下のコマンドを実行するとSession Managerプラグインのインストーラーがダウンロードされます。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
curl https://s3.amazonaws.com/session-manager-downloads/plugin/latest/windows/SessionManagerPluginSetup.exe -o SessionManagerPluginSetup.exe
curl https://s3.amazonaws.com/session-manager-downloads/plugin/latest/windows/SessionManagerPluginSetup.exe -o SessionManagerPluginSetup.exe
curl https://s3.amazonaws.com/session-manager-downloads/plugin/latest/windows/SessionManagerPluginSetup.exe -o SessionManagerPluginSetup.exe

3.インストーラーを実行します。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
./SessionManagerPluginSetup.exe
./SessionManagerPluginSetup.exe
./SessionManagerPluginSetup.exe

4. aws Session Manager plugin画面が表示されます。
「I agree to license terms and conditions」のチェックボックスにチェックを入れて「Install」をクリックします。

5.インストールが完了すると以下の画像の通り「Installation Successfully Completed」と表示されるので「Close」で閉じます。

6.PowerShellで以下のコマンドを実行します。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
>session-manager-plugin
The Session Manager plugin was installed successfully. Use the AWS CLI to start a session.
>session-manager-plugin The Session Manager plugin was installed successfully. Use the AWS CLI to start a session.
>session-manager-plugin

The Session Manager plugin was installed successfully. Use the AWS CLI to start a session.

7.EC2へ接続確認を行う

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# aws ssm start-session --target EC2のID
# aws ssm start-session --target EC2のID
# aws ssm start-session --target EC2のID

 

AWS

Posted by arkgame