From 5c5359ee56ed892bda0aa70ec068fe99f6aa6b1e Mon Sep 17 00:00:00 2001 From: jdcaballero Date: Wed, 2 Oct 2013 17:06:43 -0500 Subject: [PATCH] Update fabulous.py Boto connect method changed to allow connecting to other AWS availability zones than east default. --- fabulous.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fabulous.py b/fabulous.py index bf5414d..21a8837 100644 --- a/fabulous.py +++ b/fabulous.py @@ -3,6 +3,7 @@ from fabulous_conf import * from cookbook import recipe import boto +import boto.ec2 import time @@ -49,7 +50,8 @@ def _create_server(): Creates EC2 Instance """ print(_yellow("Creating instance")) - conn = boto.connect_ec2(ec2_key, ec2_secret) + conn = boto.ec2.connect_to_region(ec2_region, aws_access_key_id=ec2_key, aws_secret_access_key=ec2_secret) + image = conn.get_all_images(ec2_amis) reservation = image[0].run(1, 1, ec2_keypair, ec2_secgroups,