diff --git a/ec2driver.py b/ec2driver.py index b1a563e..2dea338 100644 --- a/ec2driver.py +++ b/ec2driver.py @@ -242,7 +242,7 @@ class EC2Driver(driver.ComputeDriver): if user_data: user_data = base64.b64decode(user_data) - reservation = self.ec2_conn.run_instances(aws_ami, instance_type=flavor_type, placement="us-east-1d", + reservation = self.ec2_conn.run_instances(aws_ami, instance_type=flavor_type, subnet_id=ec2_subnet_id, user_data=user_data) ec2_instance = reservation.instances diff --git a/ec2driver_standard_config.py b/ec2driver_standard_config.py index 0fd3a19..000c811 100644 --- a/ec2driver_standard_config.py +++ b/ec2driver_standard_config.py @@ -25,6 +25,7 @@ secure = True aws_ami = "ami-785bae10" #aws_ami = "ami-864d84ee" instance_type = "t2.micro" +ec2_subnet_id = "subnet-e713cdbe" # Mapping OpenStack's flavor IDs(which seems to be randomly assigned) to EC2's flavor names flavor_map = {2: 't2.micro', 5: 't2.small', 1: 't2.medium', 3: 'c3.xlarge', 4: 'c3.2xlarge'}