diff --git a/UPDATING.md b/UPDATING.md index be95b20823ff17..f2613cd3b935bf 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -40,6 +40,15 @@ assists users migrating to a new version. ## Airflow Master +### Changes to `aws_default` Connection's default region + +The region of Airflow's default connection to AWS (`aws_default`) was previously +set to `us-east-1` during installation. + +The region now needs to be set manually, either in the connection screens in +Airflow, via the `~/.aws` config files, or via the `AWS_DEFAULT_REGION` environment +variable. + ### Removed Hipchat integration Hipchat has reached end of life and is no longer available. diff --git a/airflow/utils/db.py b/airflow/utils/db.py index 4d489b0967a074..7b99a019dfbad9 100644 --- a/airflow/utils/db.py +++ b/airflow/utils/db.py @@ -194,8 +194,7 @@ def initdb(): extra='{"path": "/"}')) merge_conn( Connection( - conn_id='aws_default', conn_type='aws', - extra='{"region_name": "us-east-1"}')) + conn_id='aws_default', conn_type='aws')) merge_conn( Connection( conn_id='spark_default', conn_type='spark', diff --git a/docs/howto/connection/aws.rst b/docs/howto/connection/aws.rst index 2f671c830e7e28..9ec6087c36a9fb 100644 --- a/docs/howto/connection/aws.rst +++ b/docs/howto/connection/aws.rst @@ -35,6 +35,8 @@ Default Connection IDs The default connection ID is ``aws_default``. +.. note:: Previously, the ``aws_default`` connection had the "extras" field set to ``{"region_name": "us-east-1"}`` on install. This means that by default the ``aws_default`` connection used the ``us-east-1`` region. This is no longer the case and the region needs to be set manually, either in the connection screens in Airflow, or via the ``AWS_DEFAULT_REGION`` environment variable. + Configuring the Connection -------------------------- diff --git a/run-tests b/run-tests index 162dcd81712f71..ddcd12ad4056f0 100755 --- a/run-tests +++ b/run-tests @@ -47,6 +47,9 @@ export AIRFLOW__CORE__UNIT_TEST_MODE=True # add test/test_utils to PYTHONPATH TODO: Do we need that ??? Looks fishy. export PYTHONPATH=${PYTHONPATH:=}:${AIRFLOW_SOURCES}/tests/test_utils +# make sure the default AWS_REGION is set +export AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION:='us-east-1'} + echo Airflow home: "${AIRFLOW_HOME}" echo Airflow root: "${AIRFLOW_SOURCES}" echo Home of the user: "${HOME}" diff --git a/scripts/ci/in_container/entrypoint_ci.sh b/scripts/ci/in_container/entrypoint_ci.sh index ebf71aa3a8d529..09a2e76839b635 100755 --- a/scripts/ci/in_container/entrypoint_ci.sh +++ b/scripts/ci/in_container/entrypoint_ci.sh @@ -122,6 +122,9 @@ export PATH=${PATH}:${AIRFLOW_SOURCES} export AIRFLOW__CORE__UNIT_TEST_MODE=True +# Make sure all AWS API calls default to the us-east-1 region +export AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION:='us-east-1'} + # Fix codecov build path # TODO: Check this - this should be made travis-independent if [[ ! -h /home/travis/build/apache/airflow ]]; then