Skip to content

Commit 57a09c0

Browse files
Narek MkhitaryanNarek Mkhitaryan
authored andcommitted
fix 2068_issue
1 parent cb9fe2b commit 57a09c0

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

src/superannotate/lib/core/repositories.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ def __init__(
3636
secret_key: str,
3737
session_token: str,
3838
bucket: str,
39+
region: str,
3940
):
4041
self._session = boto3.Session(
4142
aws_access_key_id=access_key,
4243
aws_secret_access_key=secret_key,
4344
aws_session_token=session_token,
45+
region_name=region,
4446
)
4547

4648
self._resource = self._session.resource("s3")

src/superannotate/lib/core/usecases/images.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,7 @@ def s3_repo(self):
756756
self._auth_data.data["secretAccessKey"],
757757
self._auth_data.data["sessionToken"],
758758
self._auth_data.data["bucket"],
759+
self._auth_data.data["region"],
759760
)
760761

761762
def validate_project_type(self):
@@ -952,6 +953,7 @@ def s3_repository(self):
952953
self.auth_data["secretAccessKey"],
953954
self.auth_data["sessionToken"],
954955
self.auth_data["bucket"],
956+
self.auth_data["region"],
955957
)
956958
return self._s3_repo_instance
957959

src/superannotate/lib/infrastructure/controller.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ def _get_s3_repository(self, project: ProjectEntity, folder: FolderEntity):
214214
auth_data["secretAccessKey"],
215215
auth_data["sessionToken"],
216216
auth_data["bucket"],
217+
auth_data["region"],
217218
)
218219

219220
def create(self, project: ProjectEntity, annotation_class: AnnotationClassEntity):

0 commit comments

Comments
 (0)