def elasticsearch_client(conf):
 es_conn_conf = build_es_conn_config(conf)
 auth = Auth()
 es_conn_conf['http_auth'] = auth(host=es_conn_conf['es_host'], username=es_conn_conf['es_username'], password=es_conn_conf['es_password'], aws_region=es_conn_conf['aws_region'], boto_profile=es_conn_conf['boto_profile'])
 return Elasticsearch(host=es_conn_conf['es_host'], port=es_conn_conf['es_port'], url_prefix=es_conn_conf['es_url_prefix'], use_ssl=es_conn_conf['use_ssl'], verify_certs=es_conn_conf['verify_certs'], connection_class=RequestsHttpConnection, http_auth=es_conn_conf['http_auth'], timeout=es_conn_conf['es_conn_timeout'], send_get_body_as=es_conn_conf['send_get_body_as'])

def elasticsearch_client ( conf ) : es_conn_conf = build_es_conn_config ( conf ) auth = Auth ( ) es_conn_conf [ 'http_auth' ] = auth ( host = es_conn_conf [ 'es_host' ] , username = es_conn_conf [ 'es_username' ] , password = es_conn_conf [ 'es_password' ] , aws_region = es_conn_conf [ 'aws_region' ] , boto_profile = es_conn_conf [ 'boto_profile' ] ) return Elasticsearch ( host = es_conn_conf [ 'es_host' ] , port = es_conn_conf [ 'es_port' ] , url_prefix = es_conn_conf [ 'es_url_prefix' ] , use_ssl = es_conn_conf [ 'use_ssl' ] , verify_certs = es_conn_conf [ 'verify_certs' ] , connection_class = RequestsHttpConnection , http_auth = es_conn_conf [ 'http_auth' ] , timeout = es_conn_conf [ 'es_conn_timeout' ] , send_get_body_as = es_conn_conf [ 'send_get_body_as' ] )
returns an elasticsearch instance configured using an es_conn_config .