Skip to main content

Start and stop EC2s using tags. now in color!

Project description

trafficlight

start and stop ec2 instances.

installation

install with pip

pip install trafficlight

dependencies

-aws cli (installed and configured)
-python3 (my env has python aliased to python3, if yours is different you'll need to change the shebang line)

flags

  -h, --help     show this help message and exit  
  --key KEY      optional. use a tag key besides Name  
  -g, --green    start all.  
  -r, --red      stop all.  
  -y, --yes      automatically approve instance state change.  
  -H, --host     use hostnames instead of ip addresses.  
  -v, --version  show program's version number and exit  

usage

show trafficlight help page, including usage and flags.
$ trafficlight -h

switch instance with tag Name:example. if instance is stopped it will start, if it's running it will stop.
$ trafficlight example

start all instances with tag Name:example. if instances are started already they will stay up.
$ trafficlight example -g

stop all instances tag Name:example. if instances are stopped already they will stay stopped.
$ trafficlight example -r

stop all instances with tag Products:example.
$ trafficlight example --key Products -r

list all ec2s and do nothing.
$ trafficlight

list all ec2s and stop them.
$ trafficlight -r

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

trafficlight-0.1.0.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

trafficlight-0.1.0-py3-none-any.whl (5.4 kB view hashes)

Uploaded 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