Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Utilities for AWS EC2 SSM

Project description

Latest PyPI version Latest Travis CI build status

Utilities for AWS EC2 SSM

  • run commands
  • list and show invocations

Installation

Install via pip

$ pip install ssmrun

Usage

Quickly run system commands on Linux nodes:

# Target nodes by name
$ ssm cmd <target> <system_command>

# Target nodes in an auto scaling group
$ ssm cmd -A <target> <system_command>

# Target nodes created with a CloudFormation stack (including CFN ASGs)
$ ssm cmd -S <target> <system_command>

Run SSM Command:

# Run on targets filtered by EC2 tag "Name"
$ ssm run <docutment-name> <ec2-instances-name>

# Run with SSM parameters
$ ssm run <docutment-name> <ec2-instances-name> -P p1="v1" -P p2="v2"

# Run and get status for each targeted instance
$ ssm run <docutment-name> <ec2-instances-name> -s

# Run and get command output for each targeted instance
$ ssm run <docutment-name> <ec2-instances-name> -o

# Run against instances in an auto scaling group
$ ssm run <docutment-name> <asg-name> -k aws:autoscaling:groupName

# Run against instances created via CloudFormation stack
$ ssm run <docutment-name> <cfn-stack-name> -k aws:cloudformation:stack-name

List and Show SSM Command Invocations:

# Show invocation
$ ssm show <command-id>

# Show invocation and targets status
$ ssm show <command-id> -s

# Show invocation and targets status and command output
$ ssm show <command-id> -o

# List command invocations
$ ssm ls -n NUM

# List command invocations and targets status
$ ssm ls -s

List and Show SSM Documents:

# List documents
$ ssm docs

# List documents with details
$ ssm docs -l

# Get document content
$ ssm get <doc-name>

Authors

ssmrun was written by Fullscreen Devops.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ssmrun, version 0.1.5
Filename, size File type Python version Upload date Hashes
Filename, size ssmrun-0.1.5-py2-none-any.whl (7.8 kB) File type Wheel Python version py2 Upload date Hashes View hashes
Filename, size ssmrun-0.1.5.tar.gz (5.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page