@@ -16,17 +16,16 @@ def __init__(self):
1616 load_dotenv ()
1717
1818 # Get AWS S3 environment variables
19- self .endpoint_url = os .getenv ("AWS_ENDPOINT_URL" )
19+ # self.endpoint_url = os.getenv("AWS_ENDPOINT_URL")
2020 self .access_key = os .getenv ("AWS_ACCESS_KEY_ID" )
2121 self .secret_key = os .getenv ("AWS_SECRET_ACCESS_KEY" )
2222 self .bucket_name = os .getenv ("AWS_S3_BUCKET" )
2323 self .region = os .getenv ("AWS_REGION" )
24- self .secure = os .getenv ("AWS_SECURE" , "true" ).lower () == "true"
2524
2625 # Check each required variable and log if missing
2726 missing_vars = []
28- if not self .endpoint_url :
29- missing_vars .append ("AWS_ENDPOINT_URL" )
27+ # if not self.endpoint_url:
28+ # missing_vars.append("AWS_ENDPOINT_URL")
3029 if not self .access_key :
3130 missing_vars .append ("AWS_ACCESS_KEY_ID" )
3231 if not self .secret_key :
@@ -44,8 +43,7 @@ def __init__(self):
4443 raise ValueError (error_msg )
4544
4645 logging .info (
47- f"Initializing S3 client with endpoint: { self .endpoint_url } , "
48- f"bucket: { self .bucket_name } , region: { self .region } , secure: { self .secure } "
46+ f"Initializing S3 client with bucket: { self .bucket_name } , region: { self .region } "
4947 )
5048
5149 # Configure S3 client
@@ -56,11 +54,10 @@ def __init__(self):
5654
5755 self .s3_client = boto3 .client (
5856 "s3" ,
59- endpoint_url = self .endpoint_url ,
57+ # endpoint_url=self.endpoint_url,
6058 aws_access_key_id = self .access_key ,
6159 aws_secret_access_key = self .secret_key ,
6260 config = config ,
63- verify = self .secure ,
6461 )
6562
6663 # Ensure bucket exists
0 commit comments