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
flags
-h, --help show this help message and exit
--key KEY optional. use a tag key besides Name
-g, --green start.
-r, --red stop.
-y, --yes automatically approve instance state change.
-H, --host use hostnames instead of ip addresses.
-c, --connect begin an ssh session.
-K, --keyfile write pem keyfile to trafficlight config.
-p, --pipe output instance ip or hostname via standard out to pipe into other commands.
-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
connect to ec2 instance with tag Name:example. if instance is stopped it will start the instance first.
$ trafficlight example -c
update trafficlight's config file with keyfile for using -c --connect flag.
$ trafficlight -K
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for trafficlight-0.1.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50c390fd0a5c8239a1a94f75d8c707c2ea8e83b68aaa84ad19e158f6eb784dd0 |
|
MD5 | 82daa4d05fcd2e637c7b7c8f43bd9c04 |
|
BLAKE2b-256 | da731027190a92c5808d1e94318821564a68562ff9d76375d14baea4ecd440dc |