Systems Manager

We mainly check whether commands can be executed using AWS Cloud9.
If you would like to provide example commands, please submit them using the form below.
Please also provide corrections if the command examples have mistake.

Suggest
The proposed content may be modified. Please be aware of this before making any suggestions.


Install the Session Manager plugin

sudo yum install -y https://s3.amazonaws.com/session-manager-downloads/plugin/latest/linux_64bit/session-manager-plugin.rpm

output

Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
session-manager-plugin.rpm                                                                                                                | 3.0 MB  00:00:01     
Examining /var/tmp/yum-root-AQ3Eap/session-manager-plugin.rpm: session-manager-plugin-1.2.633.0-1.x86_64
Marking /var/tmp/yum-root-AQ3Eap/session-manager-plugin.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package session-manager-plugin.x86_64 0:1.2.633.0-1 will be installed
--> Finished Dependency Resolution
amzn2-core/2/x86_64                                                                                                                       | 3.6 kB  00:00:00     

Dependencies Resolved

=================================================================================================================================================================
 Package                                      Arch                         Version                           Repository                                     Size
=================================================================================================================================================================
Installing:
 session-manager-plugin                       x86_64                       1.2.633.0-1                       /session-manager-plugin                        13 M

Transaction Summary
=================================================================================================================================================================
Install  1 Package

Total size: 13 M
Installed size: 13 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : session-manager-plugin-1.2.633.0-1.x86_64                                                                                                     1/1 
ln: failed to create symbolic link ‘/usr/local/bin/session-manager-plugin’: File exists
warning: %posttrans(session-manager-plugin-1.2.633.0-1.x86_64) scriptlet failed, exit status 1
Non-fatal POSTTRANS scriptlet failure in rpm package session-manager-plugin-1.2.633.0-1.x86_64
  Verifying  : session-manager-plugin-1.2.633.0-1.x86_64                                                                                                     1/1 

Installed:
  session-manager-plugin.x86_64 0:1.2.633.0-1                                                                                                                    

Complete!

by ton

Start a session with EC2 using Session Manager

aws ssm start-session --target i-0af01c0123456789a

output

Starting session with SessionId: cloud9-045c8a0b949a60213
$ 

by ton

End a session

aws ssm terminate-session --session-id cloud9-045c8a0b949a60213

output

{
    "SessionId": "cloud9-045c8a0b949a60213"
}

by ton

タイトルとURLをコピーしました