Hi Everyone,
I have installed python-boto in yocto image and run python script to store a file in s3 bucket of AWS. But I am getting SSL certificate error, can anyone tell me what is the root cause of this error. Here is the log of python script execution.
ERROR: test_aws (__main__.awsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_aws.py", line 12, in test_aws
self.key = self.s3.get_bucket('newfw').new_key(self.filename)
File "/usr/lib/python2.7/site-packages/boto/s3/connection.py", line 506, in get_bucket
return self.head_bucket(bucket_name, headers=headers)
File "/usr/lib/python2.7/site-packages/boto/s3/connection.py", line 525, in head_bucket
response = self.make_request('HEAD', bucket_name, headers=headers)
File "/usr/lib/python2.7/site-packages/boto/s3/connection.py", line 668, in make_request
retry_handler=retry_handler
File "/usr/lib/python2.7/site-packages/boto/connection.py", line 1071, in make_request
retry_handler=retry_handler)
File "/usr/lib/python2.7/site-packages/boto/connection.py", line 1030, in _mexe
raise ex
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
So if anyone has any idea about this then provide me solution. Thanks in advance.
Please try to disable SSL certificate verification. I mean you can use something like this
requests.get('https://domain.com/',verify=False)
instead of
requests.get('https://domain.com/',verify=True)
Have a great day,
Victor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------