amazon web services - Unable to access ElasticSearch AWS through Python -
i'm trying access elasticsearch aws localhost through python (i can access through browser).
from elasticsearch import elasticsearch elastic_search_endpoint = 'https://xxx' es = elasticsearch([elastic_search_endpoint])
i'm receiving error:
improperlyconfigured('root certificates missing certificate validation. either pass them in using ca_certs parameter or install certifi use automatically.',)
how can access it? have not configured certificate, liberated ips can access elasticsearch service.
elasticsearch-py doesn’t ship default set of root certificates. have working ssl certificate validation need either specify own ca_certs or install certifi picked automatically.
from elasticsearch import elasticsearch # can use rfc-1738 specify url es = elasticsearch(['https://user:secret@localhost:443']) # ... or specify common parameters kwargs # use certifi ca certificates import certifi es = elasticsearch( ['localhost', 'otherhost'], http_auth=('user', 'secret'), port=443, use_ssl=true ) # ssl client authentication using client_cert , client_key es = elasticsearch( ['localhost', 'otherhost'], http_auth=('user', 'secret'), port=443, use_ssl=true, ca_certs='/path/to/cacert.pem', client_cert='/path/to/client_cert.pem', client_key='/path/to/client_key.pem', )
Comments
Post a Comment