update to get_secrets_key (#1755)

* raise exception when get_secrets fails, get db_uri and set as a default_dataset_config var

* log as info not an error
This commit is contained in:
Madison Dunitz
2020-08-14 18:17:21 -05:00
committed by GitHub
parent 263e893b30
commit b034055c35
4 changed files with 43 additions and 14 deletions
+6 -1
View File
@@ -9,6 +9,8 @@ import logging
from flask_talisman import Talisman
from server.common.aws_secret_utils import handle_config_from_secret
from server.common.errors import SecretKeyRetrievalError
if os.path.isdir("/opt/python/log"):
# This is the standard location where Amazon EC2 instances store the application logs.
@@ -149,7 +151,10 @@ try:
app_config.update_server_config(multi_dataset__dataroot=dataroot)
# update from secret manager
handle_config_from_secret(app_config)
try:
handle_config_from_secret(app_config)
except SecretKeyRetrievalError:
sys.exit(1)
# features are unsupported in the current hosted server
app_config.update_default_dataset_config(