I created one AWS elasticsearch instance. I want to access it using a python script. I specified my AWS configuration (access key, secret key, region). I am using below code to
Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known
seems to indicate that the elasticsearch client is not able to resolve the hostname. It could possibly be because you include the protocol https://
specified in the host.
Change that line to host = 'kbckjsdkcdn.us-east-1.es.amazonaws.com'
to see if it works. Also the example comment you have there, seems to indicate that the protocol should not be included in the host variable.