Home

Awesome

ReportCard Build Status

Amazon SSM Agent

The Amazon EC2 Simple Systems Manager (SSM) Agent is software developed for the Simple Systems Manager Service. The SSM Agent is the primary component of a feature called Run Command.

Overview

The SSM Agent runs on EC2 instances and enables you to quickly and easily execute remote commands or scripts against one or more instances. The agent uses SSM documents. When you execute a command, the agent on the instance processes the document and configures the instance as specified. Currently, the agent and Run Command enable you to quickly run Shell scripts on an instance using the AWS-RunShellScript SSM document. SSM Agent also enables the Session Manager capability that lets you manage your Amazon EC2 instance through an interactive one-click browser-based shell or through the AWS CLI. When the agent starts, it will create a user called "ssm-user" with sudo or administrator privilege. Session Manager sessions will be launched in context of this user.

Verify Requirements

Setup

Executing Commands

SSM Run Command Walkthrough Using the AWS CLI

Starting Sessions

Session Manager Walkthrough Using the AWS Console and CLI

Troubleshooting

Troubleshooting SSM Run Command Troubleshooting SSM Session Manager

Feedback

Thank you for helping us to improve Systems Manager, Run Command and Session Manager. Please send your questions or comments to Systems Manager Forums

Building inside docker container (Recommended)

docker build -t ssm-agent-build-image .
docker run -it --rm --name ssm-agent-build-container -v `pwd`:/amazon-ssm-agent ssm-agent-build-image make build-release

Building on Linux

The following folders are generated when the build completes:

bin/debian_386
bin/debian_amd64
bin/linux_386
bin/linux_amd64
bin/linux_arm
bin/linux_arm64
bin/windows_386
bin/windows_amd64

Please follow the user guide to copy and install the SSM Agent

Code Layout

GOPATH

To use vendor dependencies, the suggested GOPATH format is :<packagesource>/vendor:<packagesource>

Make Targets

The following targets are available. Each may be run with make <target>.

Make TargetDescription
build(Default) build builds the agent for Linux, Debian, Darwin and Windows amd64 and 386 environment
build-releasebuild-release checks code style and coverage, builds the agent and also packages it into a RPM, DEB and ZIP package
releaserelease checks code style and coverage, runs tests, packages all dependencies to the bin folder.
packagepackage packages build result into a RPM, DEB and ZIP package
pre-buildpre-build goes through Tools/src folder to make sure all the script files are executable
checkstylecheckstyle runs the checkstyle script
quick-integtestquick-integtest runs all tests tagged with integration using go test
quick-testquick-test runs all the tests including integration and unit tests using go test
coveragecoverage runs all tests and calculate code coverage
build-linuxbuild-linux builds the agent for execution in the Linux amd64 environment
build-windowsbuild-windows builds the agent for execution in the Windows amd64 environment
build-darwinbuild-darwin builds the agent for execution in the Darwin amd64 environment
build-linux-386build-linux-386 builds the agent for execution in the Linux 386 environment
build-windows-386build-windows-386 builds the agent for execution in the Windows 386 environment
build-darwin-386build-darwin-386 builds the agent for execution in the Darwin 386 environment
build-armbuild-arm builds the agent for execution in the arm environment
build-arm64build-arm64 builds the agent for execution in the arm64 environment
package-rpmpackage-rpm builds the agent and packages it into a RPM package for Linux amd64 based distributions
package-debpackage-deb builds the agent and packages it into a DEB package Debian amd64 based distributions
package-winpackage-win builds the agent and packages it into a ZIP package Windows amd64 based distributions
package-rpm-386package-rpm-386 builds the agent and packages it into a RPM package for Linux 386 based distributions
package-deb-386package-deb-386 builds the agent and packages it into a DEB package Debian 386 based distributions
package-win-386package-win-386 builds the agent and packages it into a ZIP package Windows 386 based distributions
package-rpm-arm64package-rpm-arm64 builds the agent and packages it into a RPM package Linux arm64 based distributions
package-deb-armpackage-deb-arm builds the agent and packages it into a DEB package Debian arm based distributions
package-deb-arm64package-deb-arm64 builds the agent and packages it into a DEB package Debian arm64 based distributions
package-linuxpackage-linux create update packages for Linux and Debian based distributions
package-windowspackage-windows create update packages for Windows based distributions
package-darwinpackage-darwin create update packages for Darwin based distributions
get-toolsget-tools gets gocode and oracle using go get
cleanclean removes build artifacts

Contributing

Contributions and feedback are welcome! Proposals and Pull Requests will be considered and responded to. Please see the CONTRIBUTING.md file for more information.

Amazon Web Services does not currently provide support for modified copies of this software.

Runtime Configuration

To set up your own custom configuration for the agent:

Config Property Definitions:

License

The Amazon SSM Agent is licensed under the Apache 2.0 License.