Skip to main content

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.

Source Distribution

ssmrun-0.1.5.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

ssmrun-0.1.5-py2-none-any.whl (7.8 kB view details)

Uploaded Python 2

File details

Details for the file ssmrun-0.1.5.tar.gz.

File metadata

  • Download URL: ssmrun-0.1.5.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ssmrun-0.1.5.tar.gz
Algorithm Hash digest
SHA256 861a78468c1ba9228b4bc85d88d5a899d90a49af2822379835c0c2797bef12af
MD5 1cecb66d8508c3fafb62a41b6d12a591
BLAKE2b-256 153979b9ac87c54af72d4115e5ecd91231991487bc7bde4805911fbfd591a502

See more details on using hashes here.

File details

Details for the file ssmrun-0.1.5-py2-none-any.whl.

File metadata

File hashes

Hashes for ssmrun-0.1.5-py2-none-any.whl
Algorithm Hash digest
SHA256 0f82a37ac7904a683181381a1ebfd48007ad0a74215e3659ae33840d7f373443
MD5 6adf9a7191625a3b0664d9f2ab1448ee
BLAKE2b-256 5c566e9f5b4c2abd0d4702f10240eb8b849ccc5cc29b095d79819ce4f456ec62

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page