7

I am using django-elasticsearch-dsl in one of our projects, and after creating a cluster in AWS Elasticsearch, I started seeing this error: Root certificates are missing for certificate validation. Either pass them in using the ca_certs parameter or install certifi to use it automatically.. There are some solutions proposed to solve the issue for https://elasticsearch-py.readthedocs.io in this linke [link][1], but that is not for django-elasticsearch-dsl which is using elasticsearch-py. I only can set the endpoint through the settings.py like this:

ELASTICSEARCH_DSL = {
    'default': {
        'hosts': 'https://my-aws-elasticsearch-endpoint.eu-central-1.es.amazonaws.com'
    }
}

How can I add/enable this certificate for django-elasticsearch-dsl

anyavacy
  • 1,311
  • 3
  • 16
  • 35

1 Answers1

7

pip install certifi should do the trick, as the message suggests. elasticsearch-py will automatically look it up.

Honza Král
  • 2,672
  • 10
  • 10