0
0

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 1 year has passed since last update.

awsコマンドまとめ(随時追加中)

0
Last updated at Posted at 2023-04-20

AWSコマンドをまとめていきます!

●mssh

instance connect CLIをインストールしていない場合は
pip install ec2instanceconnectcliを実行してから!

mssh [EC2のインスタンスID]

公式ドキュメントはこちら(mssh)

●configure

aws configure

設定確認は↓

aws configure list

個別の設定変更は↓

aws configure set region ap-northeast-1 (設定したいregion)

公式ドキュメントはこちら(configure)

●ssm

aws ssm start-session --target [インスタンスID]

対象のEC2インスタンスに鍵認証の設定無しでアクセスすることができるらしい。
セッションマネージャーのインストールとIAMロールの設定必須!

セッションマネージャーのインストールは以下のコマンドを順次実行。
(macコマンドです。Windowsは別途。)

curl "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/mac/sessionmanager-bundle.zip" -o "sessionmanager-bundle.zip"
unzip sessionmanager-bundle.zip
sudo ./sessionmanager-bundle/install -i /usr/local/sessionmanagerplugin -b /usr/local/bin/session-manager-plugin

IAMロールの作成と付与は以下の通り。
AmazonSSMManagedInstanceCore
「インスタンスの変更」→「セキュリティ」→「IAMロールの変更」で対象のインスタンスにアタッチ。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?