Skip to content
This repository has been archived by the owner on May 20, 2020. It is now read-only.

Commit

Permalink
Merge pull request #12 from jdcaballero/master
Browse files Browse the repository at this point in the history
Connection to other EC2 Regions
  • Loading branch information
gcollazo committed Jan 21, 2014
2 parents 78283ed + b3b5d7f commit 03a99af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fabulous.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from fabulous_conf import *
from cookbook import recipe
import boto
import boto.ec2
import time


Expand Down Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions fabulous_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@
# EC2 secret. http://bit.ly/j5ImEZ
ec2_secret = ''

#EC2 region. http://amzn.to/12jBkm7
ec2_region = 'us-east-1'

# AMI name. http://bit.ly/liLKxj
ec2_amis = ['ami-1335f37a']

Expand Down

0 comments on commit 03a99af

Please sign in to comment.