Python Boto scripts for handling Amazon EC2 instances.
For now this is a one-trick-pony: when given an instance Name as string and a region, it will simply return the latest instance created with that Name
$ git clone https://github.com/rpappalax/ec2-handler.git
$ cd ec2-handler
$ python setup.py develop
$ make build
ec2-handler uses the AWS boto library which requires that a config file: ".boto" be in your home dir for authentication. Be sure to secure your config file:
$ chmod 400 .boto
Example .boto file
[Credentials]
aws_access_key_id = ABCDEFGHIJKLMNOP
aws_secret_access_key= QRSTUVWXYZabcdefGHIJK/X9/o123456789
$ make build
$ source ./venv/bin/activate
(venv)$ ec2
Usage: ec2 [args..] [options]
- optional arguments:
-h, --help show this help message and exit -a ACCESS_KEY, --access-key ACCESS_KEY Access Key -s SECRET_KEY, --secret-key SECRET_KEY Secret Key -r REGION, --region REGION -p PRODUCT_NAME, --product-name PRODUCT_NAME
Product Name (i.e. loop_client)
from ec2-handler import EC2Handler
<TBD>