Windows上的SSL验证失败

Windows上的SSL验证失败

本文介绍了botocore.exceptions.SSLError:Windows上的SSL验证失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面的代码用于获取区域.

The below code is for getting the regions.

import boto3
ec2 = boto3.client('ec2', 'region-name')
print(ec2.describe_regions())

在我的计算机上执行此代码时,出现此错误.

On executing this code on my machine, I'm getting this error.

我正在Windows 10计算机上以 VS代码作为编辑器运行此代码.我在其他需要安装 Install Certificates.command 文件的地方找到了答案.但是,看起来好像只能在macOS上找到.

I am running this code on Windows 10 machine with VS code as my editor. I looked for other answers where they required to install Install Certificates.command file. However, looks like it is found on macOS only.

有人也可以告诉我这个问题的原因吗?

Can someone tell me the reason for this issue as well?

此外,上周还收到了AWS的通知,他们正在将其所有AWS FIPS终端节点更新为TLS 1.2因此需要连接到TLS版本1.2 FIPS端点.我在此处检查了我的TLS版本.它说我有TLS版本1.2.有什么相关的吗?因为在收到此通知之前,我的脚本运行得很好.

Also, last week got a notification from AWS that they are updating all their AWS FIPS endpoints to TLS 1.2and hence need to connect to TLS version 1.2 FIPS endpoints. I checked my TLS version here. It says I have TLS version 1.2. Is there anything related to this? Because prior to this notification, my script was running perfectly.

请告诉别人该错误的原因以及可能的纠正方法.另外,如果我提到我的理解有误,请纠正我.

Please someone tell the reason for this error and possible correction. Also, correct me if I mentioned something wrong with my understanding.

推荐答案

此问题之前已经在Stack Overflow上得到了回答.

This question has already been answered on Stack Overflow before.

尝试以下解决方案:

  • Reset AWS Credentials using AWS Configure
  • Issue Due to Fiddler
  • Reset HTTP/HTTPS Proxy Related Environment Variables
  • Reinstall and Upgrade AWS CLI
  • Using AWS_CA_BUNDLE Environment Variable
  • Moving CA Certificate PEM File in the Right Folder
  • Verifying CA Certificate
  • Install certifi Python Module
  • Install pyopenssl Python Module
  • Adding Trusted Root CA Details
  • Adding Trusted Host
  • Fixing the Version of requests and urllib3 Python Modules
  • Fixing CA Certificate Content and Location

注意:有一种与禁用SSL验证相关的解决方案,但不建议这样做.

Note: There is a solution related to disabling the SSL verification but that is not recommended.

这篇关于botocore.exceptions.SSLError:Windows上的SSL验证失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-12 00:38