dimon222 commented on a change in pull request #19789:
URL: https://github.com/apache/airflow/pull/19789#discussion_r755517104



##########
File path: airflow/providers/amazon/aws/hooks/s3.py
##########
@@ -341,7 +341,7 @@ def get_key(self, key: str, bucket_name: Optional[str] = 
None) -> S3Transfer:
         :return: the key object from the bucket
         :rtype: boto3.s3.Object
         """
-        session, endpoint_url = self._get_credentials()
+        session, endpoint_url = self._get_credentials(region_name=None)
         s3_resource = session.client('s3', endpoint_url=endpoint_url, 
config=self.config, verify=self.verify)

Review comment:
       Should be `session.resource()` instead

##########
File path: airflow/providers/amazon/aws/hooks/s3.py
##########
@@ -173,7 +173,7 @@ def get_bucket(self, bucket_name: Optional[str] = None) -> 
str:
         :return: the bucket object to the bucket name.
         :rtype: boto3.S3.Bucket
         """
-        session, endpoint_url = self._get_credentials()
+        session, endpoint_url = self._get_credentials(region_name=None)
         s3_resource = session.client('s3', endpoint_url=endpoint_url, 
config=self.config, verify=self.verify)

Review comment:
       Should be `session.resource()` instead




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to