diff --git a/buildman/manager/executor.py b/buildman/manager/executor.py index e4f9fb7bb..54b689611 100644 --- a/buildman/manager/executor.py +++ b/buildman/manager/executor.py @@ -121,12 +121,14 @@ 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) + interfaces = None + if self.executor_config.get('EC2_VPC_SUBNET_ID', None) is not None: + 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,