Skip to content

rpappalax/ec2-handler

Repository files navigation

ec2-handler

Description

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

travis pypi

Install

$ git clone https://github.com/rpappalax/ec2-handler.git
$ cd ec2-handler
$ python setup.py develop
$ make build

Setup

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

Build

$ make build
$ source ./venv/bin/activate

Run

(venv)$ ec2
Usage: ec2 [args..] [options]

Example

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)

Import

from ec2-handler import EC2Handler

<TBD>

About

Python Boto scripts for handling AWS EC2 instances

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published