Provide a hook into the AWS Secret Manager for the flask secret key (#1398)

Also, the secret manager required a region name, so there was some
refactoring around how regions are handled.

Fixes #1239
This commit is contained in:
bmccandless
2020-04-15 14:33:40 -07:00
committed by GitHub
parent 95ade476e8
commit 7e7ed74b92
7 changed files with 102 additions and 28 deletions
+2 -1
View File
@@ -214,7 +214,8 @@ class MatrixDataType(Enum):
class MatrixDataLoader(object):
def __init__(self, location, matrix_data_type=None, app_config=None):
""" location can be a string or DataLocator """
self.location = DataLocator(location, app_config)
region_name = None if app_config is None else app_config.data_locator__s3__region_name
self.location = DataLocator(location, region_name=region_name)
if not self.location.exists():
raise DatasetAccessError("Dataset does not exist.")