def RunInstance(region, ami_id, keypair_name, instance_type, availability_zone=None, user_data=None):
 ec2 = _Connect(region)
 ret = ec2.run_instances(ami_id, key_name=keypair_name, user_data=user_data, instance_type=instance_type, placement=availability_zone)
 assert (ret and (len(ret.instances) == 1))
 return ret.instances[0].id

def RunInstance ( region , ami_id , keypair_name , instance_type , availability_zone = None , user_data = None ) : ec2 = _Connect ( region ) ret = ec2 . run_instances ( ami_id , key_name = keypair_name , user_data = user_data , instance_type = instance_type , placement = availability_zone ) assert ( ret and ( len ( ret . instances ) == 1 ) ) return ret . instances [ 0 ] . id
run a new instance in the given region .