0

When running the following from my laptop:

import sys, os, boto3, json

payload = json.dumps({'query':query})
dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table('table1')
response = table.get_item(Key={'item': 'item1'})

I get the error:

botocore.exceptions.SSLError: SSL validation failed for https://dynamodb.eu-west-2.amazonaws.com/ [Errno 2] No such file or directory

It crashes on the last line with the "table.get_item(". This error appeared today for the first time. Prior to that, the same code had been running fine on the same laptop for the past two years. The same code still runs fine in AWS Lambda. The code is in Python 2.7.

I have been trying to resolve this issue for the past six hours. I have reinstalled boto3, botocore, awscli. Reconfigured aws cli. Updated pip and all the modules I use in Python.

Any help would be appreciated. Thank you.

  • Are you connecting by using a VPN by any chance? – Andre.IDK Sep 10 '20 at 10:53
  • https://stackoverflow.com/questions/63557500/botocore-exceptions-sslerror-ssl-validation-failed-on-windows – error404 Sep 13 '20 at 09:32
  • No, I am not using a VPN. – Sebastien Michaud Sep 14 '20 at 08:04
  • I've tried following every fix at the link provided above but some "solutions" are confusing to me. In my case the ssl error occurs when I make calls to the AWS API using boto3 as detailed in my original post. I have never needed a certificate for this before. Where in AWS can I get this certificate? I've searched the AWS documentation and certificates apply to servers and API Gateway, not boto3. Also I have already reinstalled boto3 and AWS CLI but this did not fix the error. – Sebastien Michaud Sep 14 '20 at 15:28

0 Answers0