From f9115faeb77b0fe3e30330654345fde6cc3876f0 Mon Sep 17 00:00:00 2001 From: Chris Battisto <34325676+battistowx@users.noreply.github.com> Date: Tue, 6 Feb 2024 13:37:01 -0600 Subject: [PATCH] Change boto3 region check to use botocore --- earthaccess/store.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/earthaccess/store.py b/earthaccess/store.py index 37c4c77a..e0a3624c 100644 --- a/earthaccess/store.py +++ b/earthaccess/store.py @@ -9,7 +9,7 @@ from typing import Any, Dict, List, Mapping, Optional, Tuple, Union from uuid import uuid4 -import boto3 +import botocore.session import fsspec import requests import s3fs @@ -141,7 +141,7 @@ def _own_s3_credentials(self, links: List[Dict[str, Any]]) -> Union[str, None]: return None def _running_in_us_west_2(self) -> bool: - if (boto3.client('s3').meta.region_name == 'us-west-2'): + if (botocore.session.get_session().get_config_variable('region') == 'us-west-2'): return True else: return False