0

I am currently new with the boto and SSL. I am running a code which creates instances in AWS. When I run the code (tried on global and virtual env both) I get the error:

self._sslobj.do_handshake() ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)

I checked various posts but none of them work. Cross checked my .aws, installed certifi. Checked openssl:

$ python -c "import ssl; print ssl.OPENSSL_VERSION"      
OpenSSL 1.0.2o  27 Mar 2018.

Do I need to some how insert openssl in my virtual environment?

Edit 1- For the temporary fix

$  export PYTHONHTTPSVERIFY=0 
h0lmes221B
  • 101
  • 1
  • 4
  • Your Certificate Verification is failing which could be due to reasons like the CA certificate not being present on the Client to verify the server's certificate. – Jay Jan 22 '19 at 12:21
  • @Jay I don't think failing certification is the reason because for other people in my organisation it is working fine – h0lmes221B Jan 23 '19 at 09:35
  • CERTIFICATE_VERIFY_FAILED - This error is thrown only when there is a certificate verification failure. – Jay Jan 23 '19 at 09:36

1 Answers1

0

I might be late here. But for me this helped.

This is an answer to a similar problem by user andilabs!

import ssl

ssl._create_default_https_context = ssl._create_unverified_context

Find out more here : https://stackoverflow.com/a/52172355/3548966