uranusjr commented on a change in pull request #19789:
URL: https://github.com/apache/airflow/pull/19789#discussion_r755491582
##########
File path: airflow/providers/amazon/aws/hooks/s3.py
##########
@@ -164,16 +164,18 @@ def check_for_bucket(self, bucket_name: Optional[str] =
None) -> bool:
return False
@provide_bucket_name
- def get_bucket(self, bucket_name: Optional[str] = None) -> str:
+ def get_bucket(self, bucket_name: Optional[str] = None, *, region_name:
Optional[str] = None) -> str:
"""
Returns a boto3.S3.Bucket object
:param bucket_name: the name of the bucket
:type bucket_name: str
:return: the bucket object to the bucket name.
:rtype: boto3.S3.Bucket
+ :param region_name: The name of the aws region in which to get the
bucket.
+ :type region_name: str
"""
- session, endpoint_url = self._get_credentials()
+ session, endpoint_url = self._get_credentials(region_name=region_name)
Review comment:
I felt it’s apretty cheap feature to add. But you’re right, let’s not
complicate things. We can always add those back is someone wants them.
--
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]