def aws_provisioner(access_key, secret_access_token, keyname, region, zone, security_groups, instance_type='m3.large', session_token=None):
 conn = connect_to_region(region, aws_access_key_id=access_key, aws_secret_access_key=secret_access_token, security_token=session_token)
 if (conn is None):
  raise ValueError('Invalid region: {}'.format(region))
 return AWSProvisioner(_connection=conn, _keyname=keyname, _security_groups=security_groups, _zone=zone, _default_size=instance_type)

def aws_provisioner ( access_key , secret_access_token , keyname , region , zone , security_groups , instance_type = 'm3.large' , session_token = None ) : conn = connect_to_region ( region , aws_access_key_id = access_key , aws_secret_access_key = secret_access_token , security_token = session_token ) if ( conn is None ) : raise ValueError ( 'Invalid region: {}' . format ( region ) ) return AWSProvisioner ( _connection = conn , _keyname = keyname , _security_groups = security_groups , _zone = zone , _default_size = instance_type )
create an iprovisioner for provisioning nodes on aws ec2 .