python - Getting CERTIFICATE_VERIFY_FAILED. How to pass pem file to tinys3 ? -


i trying upload aws s3. python program using version 2.7.12

import tinys3 s3_access_key='' s3_secret_key='' conn = tinys3.connection(s3_access_key,s3_secret_key,tls=true)  f = open('d:\\poc\\dicomimage','rb') conn.upload('d:\\poc\\sampleimage',f,'development/system') 

but getting below error: requests.exceptions.sslerror: [ssl: certificate_verify_failed] certificate verify failed (_ssl.c:590)

i cannot set tls=false. tried below things getting same error time

  1. added cert=cert_path, pip.ini
  2. also executed - pip uninstall -y certifi && pip install certifi==2015.04.28, mentioned in various posts.

how can pass pem file tinys3 or setting fix issue.

ps: full time java developer, fortunately/unfortunately first python program. so, please explain how things working here.

you should specify endpoint of bucket

conn = tinys3.connection(s3_access_key,s3_secret_key,tls=true,endpoint='s3-us-east-1.amazonaws.com') 

change endpoint match endpoint of bucket, check aws list of region endpoint


Comments