session-manager-plugin

module
v0.0.0-...-e12e3d7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2024 License: Apache-2.0

README

Session Manager Plugin

This plugin helps you to use the AWS Command Line Interface (AWS CLI) to start and end sessions to your managed instances. Session Manager is a capability of AWS Systems Manager.

Overview

Session Manager is a fully managed AWS Systems Manager capability that lets you manage your Amazon Elastic Compute Cloud (Amazon EC2) instances, on-premises instances and virtual machines. Session Manager provides secure and auditable instance management without the need to open inbound ports. When you use the Session Manager plugin with the AWS CLI to start a session, the plugin builds the websocket connection to your managed instances.

Prerequisites

Before using Session Manager, make sure your environment meets the following requirements. Complete Session Manager prerequisites.

Starting a session

For information about starting a session using the AWS CLI, see Starting a session (AWS CLI).

Troubleshooting

For information about troubleshooting, see Troubleshooting Session Manager.

Working with Docker

To build the Session Manager plugin in a Docker container, complete the following steps:

  1. Install docker

  2. Build the docker image

docker build -t session-manager-plugin-image .
  1. Build the plugin
docker run -it --rm --name session-manager-plugin -v `pwd`:/session-manager-plugin session-manager-plugin-image make release
Working with Linux

To build the binaries required to install the Session Manager plugin, complete the following steps.

  1. Install golang

  2. Install rpm-build and rpmdevtools

  3. Install gcc 8.3+ and glibc 2.27+

  4. Run make release to build the plugin for Linux, Debian, macOS and Windows.

  5. Change to the directory of your local machine's operating system architecture and open the session-manager-plugin directory. Then follow the installation procedure that applies to your local machine. For more information, see Install the Session Manager plugin for the AWS CLI. If the machine you're building the plugin on differs from the machine you plan to install the plugin on you will need to copy the session-manager-plugin binary to the appropriate directory for that operating system.

Linux - /usr/local/sessionmanagerplugin/bin/session-manager-plugin

macOS - /usr/local/sessionmanagerplugin/bin/session-manager-plugin

Windows - C:\Program Files\Amazon\SessionManagerPlugin\bin\session-manager-plugin.exe

The ssmcli binary is available for some operating systems for testing purposes only. The following is an example command using this binary.

./ssmcli start-session --instance-id i-1234567890abcdef0 --region us-east-2
Directory structure

Source code

  • sessionmanagerplugin/session contains the source code for core functionalities
  • communicator/ contains the source code for websocket related operations
  • vendor/src contains the vendor package source code
  • packaging/ contains rpm and dpkg artifacts
  • Tools/src contains build scripts

Feedback

Thank you for helping us to improve the Session Manager plugin. Please send your questions or comments to the Systems Manager Forum

License

The session-manager-plugin is licensed under the Apache 2.0 License.

Directories

Path Synopsis
src
communicator
this package implement base communicator for network connections.
this package implement base communicator for network connections.
communicator/mocks
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.
config
config package implement configuration retrieval for session manager apis
config package implement configuration retrieval for session manager apis
datachannel
datachannel package implement data channel for interactive sessions.
datachannel package implement data channel for interactive sessions.
datachannel/mocks
Code generated by mockery 2.7.4.
Code generated by mockery 2.7.4.
jsonutil
Package jsonutil contains various utilities for dealing with json data.
Package jsonutil contains various utilities for dealing with json data.
log
Package log is used to initialize logger
Package log is used to initialize logger
message
message package defines data channel messages structure.
message package defines data channel messages structure.
retry
retry implements back off retry strategy for reconnect web socket connection.
retry implements back off retry strategy for reconnect web socket connection.
sdkutil
Package sdkutil provides utilities used to call awssdk.
Package sdkutil provides utilities used to call awssdk.
sdkutil/retryer
Package retryer overrides the default aws sdk retryer delay logic to better suit the mds needs
Package retryer overrides the default aws sdk retryer delay logic to better suit the mds needs
service
Package service is a wrapper for the new Service
Package service is a wrapper for the new Service
sessionmanagerplugin-main
Package main represents the entry point to session manager plugin.
Package main represents the entry point to session manager plugin.
sessionmanagerplugin/session
Package session starts the session.
Package session starts the session.
sessionmanagerplugin/session/portsession
Package portsession starts port session.
Package portsession starts port session.
sessionmanagerplugin/session/sessionutil
Package sessionutil contains utility methods required to start session.
Package sessionutil contains utility methods required to start session.
sessionmanagerplugin/session/shellsession
Package shellsession starts shell session.
Package shellsession starts shell session.
ssmcli-main
Package main represents the entry point of the ssm cli.
Package main represents the entry point of the ssm cli.
ssmclicommands
Package ssmclicommands contains all the commands with its implementation.
Package ssmclicommands contains all the commands with its implementation.
ssmclicommands/utils
Package utils contains all the utility functions.
Package utils contains all the utility functions.
version
Package version contains CLI version constant and utilities.
Package version contains CLI version constant and utilities.
version/versiongenerator
Package main represents the entry point to generate version.
Package main represents the entry point to generate version.
websocketutil
Package websocketutil contains methods for interacting with websocket connections.
Package websocketutil contains methods for interacting with websocket connections.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL