连接到S3时Boto [SSL:CERTIFICATE_VERIFY_FAILED]证书验证失败 [英] Boto [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed while connecting to S3

查看:187
本文介绍了连接到S3时Boto [SSL:CERTIFICATE_VERIFY_FAILED]证书验证失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Boto连接到S3,但似乎失败。我尝试了一些解决方法,但它们似乎没有用。谁能帮我这个忙。下面是代码。

I am trying to connect to S3 using boto, but it seems to fail. I've tried some workarounds, but they don't seem to work. Can anyone please help me with this. Below is the code.

import boto

if not boto.config.has_section('Credentials'):
    boto.config.add_section('Credentials')
boto.config.set('Credentials', 'aws_access_key_id', AWS_KEY)
boto.config.set('Credentials', 'aws_secret_access_key', AWS_SECRET_KEY)
if not boto.config.has_section('Boto'):
    boto.config.add_section('Boto')
    boto.config.set('Boto', 'https_validate_certificates', 'False')
    boto.config.add_section('aws info')
    boto.config.set('aws info','aws_validate_certs','False')



s3 = boto.connect_s3(validate_certs=False)
bucket = s3.get_bucket(Bucket_NAME)


推荐答案

我找到了一种方法

使用了 is_secure = False connect_s3()中。

这篇关于连接到S3时Boto [SSL:CERTIFICATE_VERIFY_FAILED]证书验证失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆