명령어 실행 가능 여부는 주로 AWS Cloud9에서 확인하고 있습니다.
명령어 예시를 제공해 주실 분은 문의 양식을 통해 보내 주세요.
기재된 명령어 예시의 수정 요청도 이곳에서 연락해 주세요.
Session Manager 플러그인 설치
sudo yum install -y https://s3.amazonaws.com/session-manager-downloads/plugin/latest/linux_64bit/session-manager-plugin.rpm
출력
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
Session Manager에서 EC2와의 세션 시작
aws ssm start-session --target i-0af01c0123456789a
출력
Starting session with SessionId: cloud9-045c8a0b949a60213
$
by ton
세션 종료
aws ssm terminate-session --session-id cloud9-045c8a0b949a60213
출력
{
"SessionId": "cloud9-045c8a0b949a60213"
}
by ton