Skip to main content

AWS Shortcuts for Command-Line Instance Control

Project description

List, start, stop and ssh to AWS instances using Name or Instance-ID

Travis Code Climate GitHub issues PyPi release lang license


AWS Shortcuts (awss) allows listing, starting, stopping and connecting to instances by Name or ID. Future versions will also allow referencing instances with any Tag : Value combination.

Note: This utility requires Python 2.7 or newer. There is a similar utility written in Bash called aws-quick-cli.

Overview

awss has the following sub-commands: list, start, stop, and ssh.

  • SSH to an Instance: awss ssh NAME or aws ssh -i ID

    • Additional paramters described in Details.

  • List Instances: awss list

    • Additional paramters described in Details.

  • Start Instance: awss start NAME or awss start -i ID

  • Stop Instance: awss stop NAME or awss stop -i ID

Details

  • SSH to Instance: awss ssh NAME or awss ssh -i ID

    • automatically calculates login-name based on the image-type of the instance

    • override the calculated login-name -u USERNAME

    • connect without PEM keys (if properly configured) -p

    • command specific help awss ssh -h

  • List Instances: awss list

    • list all instances (default)

    • list running instances -r or --running

    • list stopped instances -s or --stopped

    • list instances with specified name awss list NAME

    • list instance with specified instance-id awss list -i ID

    • state, NAME, and instance-id may be combined in queries

      • ex: list instances with NAME currently running: awss list NAME -r

    • command specific help awss list -h

  • Start Instance: awss start NAME or awss start -i ID

    • start instance by name or instance-id

    • command specific help awss start -h

  • Stop Instance: awss stop NAME or awss stop -i ID

    • start instance by name or instance-id

    • command specific help awss stop -h

Target Instance Verification

The start, stop, and ssh commands verify that their action will apply to only one instance

  • This check is performed by looking for other instances that match:

    • the instance-specification given (name or ID)

    • the running-state appropriate for the command

  • If multiple instances match these conditions, they are listed and the user selects the intended target.

The running-state appropriate for each command is as follows:

  • The ssh command looks for running instances (it cannot connect to stopped instanced)

  • The stop command looks for running instances (it cannot stop instances that are already stopped)

  • The start command looks for stopped instances (it cannot start instances that are already started)

  • The list command looks at all instances, unless optional parameters have been specified to narrow its search to running, stopped or specific instances.

Supported Versions & Platforms

Python 2.7, 3.3, 3.4, 3.5, 3.6

Platforms:

  • Linux

  • macOS (OS X)

  • Windows

Installation

This utility can be installed with pip:

pip install awss

Download files

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

Source Distribution

awss-0.9.6.tar.gz (14.2 kB view hashes)

Uploaded Source

Built Distribution

awss-0.9.6-py2.py3-none-any.whl (14.9 kB view hashes)

Uploaded Python 2 Python 3

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