GithubHelp home page GithubHelp logo

ssmrun's Introduction

ssmrun

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>

ssmrun's People

Contributors

boroivanov avatar giuliocalzolari avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.