diff --git a/buildman/manager/executor.py b/buildman/manager/executor.py index 806ff7845..b9d38eb70 100644 --- a/buildman/manager/executor.py +++ b/buildman/manager/executor.py @@ -117,15 +117,22 @@ class EC2Executor(BuilderExecutor): ) block_devices = boto.ec2.blockdevicemapping.BlockDeviceMapping() block_devices['/dev/xvda'] = ssd_root_ebs + + interface = boto.ec2.networkinterface.NetworkInterfaceSpecification( + subnet_id=self.executor_config['EC2_VPC_SUBNET_ID'], + groups=self.executor_config['EC2_SECURITY_GROUP_IDS'], + associate_public_ip_address=True, + ) + interfaces = boto.ec2.networkinterface.NetworkInterfaceCollection(interface) + reservation = yield From(ec2_conn.run_instances( coreos_ami, instance_type=self.executor_config['EC2_INSTANCE_TYPE'], - subnet_id=self.executor_config['EC2_VPC_SUBNET_ID'], - security_group_ids=self.executor_config['EC2_SECURITY_GROUP_IDS'], key_name=self.executor_config.get('EC2_KEY_NAME', None), user_data=user_data, instance_initiated_shutdown_behavior='terminate', block_device_map=block_devices, + network_interfaces=interfaces, )) if not reservation.instances: