%curl "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/linux_64bit/session-manager-plugin.rpm" -o "session-manager-plugin.rpm"
%sudo yum install -y session-manager-plugin.rpm
以下のコマンドを実行
session-manager-plugin
The Session Manager plugin was installed successfully. Use the AWS CLI to start a session. と出力されれば、OK
##amazon Linux2の場合です。他のディストリビューションは未調査です。
"botocore.exceptions.ClientError: An error occurred (OperationNotPermitted) when calling the StopInstances operation: The instance 'i-xxxxxxxxxyyyyy' may not be stopped. Modify its 'disableApiStop' instance attribute and try again.\n"] ClientError