diff --git a/airflow/bin/cli.py b/airflow/bin/cli.py index c85022eb6b..8adc457059 100755 --- a/airflow/bin/cli.py +++ b/airflow/bin/cli.py @@ -225,7 +225,8 @@ def run(args): new_log = old_s3_log + '\n' + new_log # send log to S3 - s3_key.set_contents_from_string(new_log) + encrypt = configuration.get('core', 'ENCRYPT_S3_LOGS') + s3_key.set_contents_from_string(new_log, encrypt_key=encrypt) except: print('Could not send logs to S3.') diff --git a/airflow/configuration.py b/airflow/configuration.py index 01c3041425..73d4499cfd 100644 --- a/airflow/configuration.py +++ b/airflow/configuration.py @@ -54,6 +54,7 @@ defaults = { 'security': None, 'donot_pickle': False, 's3_log_folder': '', + 'encrypt_s3_logs': False, 'dag_concurrency': 16, 'max_active_runs_per_dag': 16, 'executor': 'SequentialExecutor',