From b2a722fde7fae2363112985470aac8ae50a61e5a Mon Sep 17 00:00:00 2001 From: Barbara Hui Date: Tue, 23 Jan 2024 16:53:21 -0800 Subject: [PATCH] Add default values in record_indexer/settings.py --- record_indexer/settings.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/record_indexer/settings.py b/record_indexer/settings.py index 9fa9b99be..486887c45 100644 --- a/record_indexer/settings.py +++ b/record_indexer/settings.py @@ -8,9 +8,11 @@ def get_auth(): credentials = Session().get_credentials() - return AWSV4SignerAuth(credentials, os.environ.get("AWS_REGION")) + if not credentials: + return False + return AWSV4SignerAuth(credentials, os.environ.get("AWS_REGION", "us-west-2")) -ENDPOINT = os.environ.get("RIKOLTI_ES_ENDPOINT") +ENDPOINT = os.environ.get("RIKOLTI_ES_ENDPOINT", False) AUTH = get_auth() RIKOLTI_HOME = os.environ.get("RIKOLTI_HOME", "/usr/local/airflow/dags/rikolti")