I’m having trouble connecting to my AWS S3 bucket

lusy26demco
New Contributor

Hello,

I’m having trouble connecting to my AWS S3 bucket from my local Python environment using boto3. When I try to run the following code:

import boto3
s3 = boto3.client('s3')
response = s3.list_objects_v2(Bucket='my-bucket-name')
print(response)

error message:

botocore.exceptions.SSLError: Can't connect to HTTPS URL because the SSL module is not available.

I’ve already run aws configure to set up my credentials, but I’m still seeing this error. I’m not sure if this is an issue with my Python installation, SSL configuration, or something else.

Thanks for any insights or suggestions!

Best Regard,

Lusy

 

 

dineshk
New Contributor II

Can you check your firewall rules in AWS if that is not blocking outgoing requests. 

saisaran_g
Contributor

Hello Mate,

Are you trying from databricks notebook? if so can you share the dbr version ?

If not, you can install the below code :

import ssl
print(ssl.OPENSSL_VERSION)

and update the pip package : 

`pip install --upgrade pip`
 
try post this.
 
Happy learning,
Saran
Happy Learning and solve new errors :
Saran