From 4d9f03bbae76033b602eb10204eb8b4fa846ca12 Mon Sep 17 00:00:00 2001 From: Karthik Palaniappan Date: Tue, 7 May 2024 11:47:38 -0700 Subject: [PATCH 1/2] Pass through AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION --- docker/docker-compose-local.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/docker-compose-local.yml b/docker/docker-compose-local.yml index 510824857..04790fe9c 100644 --- a/docker/docker-compose-local.yml +++ b/docker/docker-compose-local.yml @@ -21,6 +21,9 @@ services: environment: - LOAD_EX=n - EXECUTOR=Local + - "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" + - "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" + - "AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION}" logging: options: max-size: 10m From 2574dec901b7393fb2ca534efd28974a9b2ed93f Mon Sep 17 00:00:00 2001 From: Karthik Palaniappan Date: Tue, 7 May 2024 11:51:59 -0700 Subject: [PATCH 2/2] Update README.md with AWS environment variables --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 49b402bd1..30584e1c7 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,15 @@ Runs a local Apache Airflow environment that is a close representation of MWAA b To stop the local environment, Ctrl+C on the terminal and wait till the local runner and the postgres containers are stopped. +If you need to authenticate with any live AWS services such as S3, export the following environment variables, which will get passed through: + +```bash +export AWS_ACCESS_KEY_ID=... +export AWS_SECRET_ACCESS_KEY=... +export AWS_DEFAULT_REGION=... +./mwaa-local-env start +``` + ### Step three: Accessing the Airflow UI By default, the `bootstrap.sh` script creates a username and password for your local Airflow environment.