title: ElasticSearch error: 'The client noticed that the server is not a supported distribution of Elasticsearch'
body: <p>New to ElasticSearch. I was following this guide to get things set up: <a href="https://john.soban.ski/boto3-ec2-to-amazon-elasticsearch.html" rel="nofollow noreferrer">https://john.soban.ski/boto3-ec2-to-amazon-elasticsearch.html</a></p>
  <p>I ran the &quot;connect_to_es.py&quot; script there, and oddly it worked the first time, but in a subsequent runs, it started throwing this error:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;../connect_to_es.py&quot;, line 21, in &lt;module&gt;
      print(json.dumps(es.info(), indent=4, sort_keys=True))
    File &quot;/home/ubuntu/projects/.venv/lib/python3.8/site-packages/elasticsearch/client/utils.py&quot;, line 168, in _wrapped
      return func(*args, params=params, headers=headers, **kwargs)
    File &quot;/home/ubuntu/projects/.venv/lib/python3.8/site-packages/elasticsearch/client/__init__.py&quot;, line 294, in info
      return self.transport.perform_request(
    File &quot;/home/ubuntu/projects/.venv/lib/python3.8/site-packages/elasticsearch/transport.py&quot;, line 413, in perform_request
      _ProductChecker.raise_error(self._verified_elasticsearch)
    File &quot;/home/ubuntu/projects/.venv/lib/python3.8/site-packages/elasticsearch/transport.py&quot;, line 630, in raise_error
      raise UnsupportedProductError(message)
  elasticsearch.exceptions.UnsupportedProductError: The client noticed that the server is not a supported distribution of Elasticsearch
  </code></pre>
  <p>The elasticsearch python library version I have is 7.14, and my elasticsearch on AWS is running 7.10. Any thoughts on what's going on here?</p>
  <p>Copy of code:</p>
  <pre><code>from elasticsearch import Elasticsearch, RequestsHttpConnection
  from requests_aws4auth import AWS4Auth
  import boto3
  import json
  
  host = '&lt;url&gt;.us-east-1.es.amazonaws.com'
  region = 'us-east-1'
  
  service = 'es'
  credentials = boto3.Session().get_credentials()
  awsauth = AWS4Auth(credentials.access_key, credentials.secret_key, region, service, session_token=credentials.token)
  
  es = Elasticsearch(
      hosts = [{'host': host, 'port': 443}],
      http_auth = awsauth,
      use_ssl = True,
      verify_certs = True,
      connection_class = RequestsHttpConnection
  )
  
  print(json.dumps(es.info(), indent=4, sort_keys=True))
  </code></pre>