Here is my python code for connecting to Elasticsearch:
from elasticsearch import Elasticsearch
es = Elasticsearch([HOST], http_auth = (str(USERNAME), str(PASSWORD)), scheme = "https", port=443)
Error:
/usr/local/lib/python3.6/dist-packages/elasticsearch/connection/http_urllib3.py:54: UserWarning: Connecting to <my_url>.aws.found.io using SSL with verify_certs=False is insecure.
'Connecting to %s using SSL with verify_certs=False is insecure.' % host)
The connection used to work, but not anymore.
More information:
es.info()
returns:
{'cluster_name': '<cluster_name>',
'cluster_uuid': '<cluster_uuid>',
'name': '<instance_name>,
'tagline': 'You Know, for Search',
'version': {'build_date': '2019-09-06T14:40:30.409026Z',
'build_flavor': 'default',
'build_hash': '<build_hash>',
'build_snapshot': False,
'build_type': 'tar',
'lucene_version': '8.1.0',
'minimum_index_compatibility_version': '6.0.0-beta1',
'minimum_wire_compatibility_version': '6.8.0',
'number': '7.3.2'}}
Python3 --version
= 3.6.8
pip3 --version
= pip 9.0.1 from /usr/local/lib/python3.6/dist-packages (python 3.6)