From c0e7d9adcdbb6d3a1d3c05bb6bea89efaf2d465c Mon Sep 17 00:00:00 2001 From: Fredrik Wallberg Date: Fri, 26 Oct 2018 14:33:24 +0200 Subject: [PATCH] feat: s3 storage configuration changes (#444) * feat: include region name and default acl in s3 storage config (#441) * chore: fix producer pip requirements --- aether-common-module/aether/common/conf/settings.py | 9 ++++++--- aether-producer/conf/pip/requirements.txt | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/aether-common-module/aether/common/conf/settings.py b/aether-common-module/aether/common/conf/settings.py index 6f885b604..043c5f423 100644 --- a/aether-common-module/aether/common/conf/settings.py +++ b/aether-common-module/aether/common/conf/settings.py @@ -310,9 +310,12 @@ elif DJANGO_STORAGE_BACKEND == 's3': DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage' - AWS_STORAGE_BUCKET_NAME = os.environ['BUCKET_NAME'] - if not AWS_STORAGE_BUCKET_NAME: - msg = 'Missing BUCKET_NAME environment variable!' + try: + AWS_STORAGE_BUCKET_NAME = os.environ['BUCKET_NAME'] + AWS_S3_REGION_NAME = os.environ['AWS_S3_REGION_NAME'] + AWS_DEFAULT_ACL = os.environ['AWS_DEFAULT_ACL'] + except KeyError as key: + msg = f'Missing {key} environment variable!' logger.critical(msg) raise RuntimeError(msg) diff --git a/aether-producer/conf/pip/requirements.txt b/aether-producer/conf/pip/requirements.txt index 4949e315b..c8d576a4c 100644 --- a/aether-producer/conf/pip/requirements.txt +++ b/aether-producer/conf/pip/requirements.txt @@ -22,7 +22,7 @@ Flask==1.0.2 gevent==1.3.7 greenlet==0.4.15 idna==2.7 -ItsDangerous==1.0.0 +itsdangerous==0.24 Jinja2==2.10 jsonref==0.2 jsonschema==2.6.0 @@ -31,7 +31,7 @@ monotonic==1.5 msgpack-python==0.5.6 psycogreen==1.0 psycopg2-binary==2.7.5 -python-dateutil==2.7.3 +python-dateutil==2.7.4 pytz==2018.6 PyYAML==3.13 requests==2.20.0