Skip to main content

AWS Shortcuts for Command-Line Instance Control

Project description

List, start, stop and ssh to AWS instances using Name, ID and Wilcards

Travis AppVeyor Codacy Grade Codacy Cov PyPi release Python Versions license sm


AWS Shortcuts (awss) allows listing, starting, stopping and connecting to instances by name, instance-id, and supports wilcards. The awss list command displays every tag & value for each instances along with their status and core info. In the near future you will also be able to use any combination of Tag : Value combinations when specifying instances.

Overview

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

  • SSH to an Instance: awss ssh NAME or awss 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

Example output of awss list

https://cloud.githubusercontent.com/assets/1554603/25595372/6c3bd5e2-2e79-11e7-9ebc-4730f93c2cb6.png

Details

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

    • typing awss ssh without a name or ID will display all running instances

      • this allows the user to select from the list if they can’t remember the name.

      • this can be combined with wilcards, for example awss ssh U* to display a list of instances starting with “U” to select from.

    • the login-name is automatically calculated 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), or use wilcards awss list D*

    • 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

    • instance-state and NAME 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

    • typing awss start without a name or ID will display all stopped instances

      • this allows the user to select from the list if they can’t remember the name.

      • this can be combined with wilcards, for example awss start U* to display a list of instances starting with “U” to select from.

    • start instance by name or instance-id

    • command specific help awss start -h

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

    • typing awss stop without a name or ID will display all running instances

      • this allows the user to select from the list if they can’t remember the name.

      • this can be combined with wilcards, for example awss stop U* to display a list of instances starting with “U” to select from.

    • start instance by name or instance-id

    • command specific help awss stop -h

Target Instance Determination

The start, stop, and ssh commands check if multiple instances match the parameters. If so, the the matching instances are listed, and the user selects the intended target.

Example screenshot of selecting instance from list:

https://cloud.githubusercontent.com/assets/1554603/25595396/84b4ef64-2e79-11e7-922f-d645b007af57.png

Platforms & Python Versions Tested

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

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

awss-0.9.7.tar.gz (14.3 kB view hashes)

Uploaded Source

Built Distribution

awss-0.9.7-py2.py3-none-any.whl (14.6 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