OpenLineage with Airflow on AWS Managed Workflows for Apache Airflow (MWAA)
This guide explains how to configure OpenLineage integration with ADOC in an Airflow environment running on AWS Managed Workflows for Apache Airflow (MWAA).
Step 1: Add OpenLineage as a dependency
MWAA manages Python dependencies through the file. Add the following line alongside any existing dependencies:requirements.txt
apache-airflow-providers-openlineage
You can specify a version, or leave it blank to install the latest available version.
Step 2: Configure OpenLineage transport
There are two options for configuring authentication between OpenLineage and ADOC. Configure one of the following.
Option 1: Use custom_headers
custom_headers
A token provider plugin is not required when using custom_headers.
Create a file named with the following content. Replace the placeholders with your ADOC tenant values:env_var_plugin.py
from airflow.plugins_manager import AirflowPluginimport osimport jsontransport_config = { "type": "http", "url": "<ADOC Host URL>", "endpoint": "/torch-pipeline/api/v1/lineage", "custom_headers": { "X-ACCELDATA-ACCESS-KEY": "<ADOC Access Key>", "X-ACCELDATA-SECRET-KEY": "<ADOC Secret Key>" }}os.environ["AIRFLOW__OPENLINEAGE__TRANSPORT"] = json.dumps(transport_config)os.environ["AIRFLOW__OPENLINEAGE__NAMESPACE"] = "mwaa_aws"os.environ["AIRFLOW__OPENLINEAGE__EXECUTION_TIMEOUT"] = "60"os.environ["AIRFLOW__OPENLINEAGE__DISABLED"] = "false"os.environ["AIRFLOW__OPENLINEAGE__DEBUG_MODE"] = "true"class EnvVarPlugin(AirflowPlugin): name = "env_var_plugin"
With this approach, only is required. The token provider plugin and an Airflow Connection are not required.env_var_plugin.py
Option 2: Use an Airflow Connection with a token provider
Use this option if you prefer to manage your ADOC access key and secret key through an Airflow Connection instead of specifying them directly in the transport configuration. This option requires the token provider plugin.
Create a file named . Use the same token provider implementation described in OpenLineage with On-Premise Airflow.access_key_secret_token_provider.py
Then create with the following content:env_var_plugin.py
from airflow.plugins_manager import AirflowPluginimport osimport jsontransport_config = { "type": "http", "url": "<ADOC Host URL>", "endpoint": "/torch-pipeline/api/v1/lineage", "auth": { "type": "tokenproviders.access_key_secret_token_provider.AccessKeySecretKeyTokenProvider", }}os.environ["AIRFLOW__OPENLINEAGE__TRANSPORT"] = json.dumps(transport_config)os.environ["AIRFLOW__OPENLINEAGE__NAMESPACE"] = "mwaa_aws"os.environ["AIRFLOW__OPENLINEAGE__EXECUTION_TIMEOUT"] = "60"os.environ["AIRFLOW__OPENLINEAGE__DISABLED"] = "false"os.environ["AIRFLOW__OPENLINEAGE__DEBUG_MODE"] = "true"class EnvVarPlugin(AirflowPlugin): name = "env_var_plugin"
Follow the steps below to create the Airflow Connection that provides your access key and secret key:
- Log in to the Airflow UI.
- Navigate to Admin → Connections.
- Click Add (➕) to create a new connection.
- Fill in the following details:
- Connection ID:
acceldata_connection - Connection Type:
HTTP - Host: The host name of your ADOC tenant (use the same host value as defined in the transport configuration)
- Login: Your ADOC access key
- Password: Your ADOC secret key
- Connection ID:
- Click Save to create the connection.
Once saved, Airflow securely manages your credentials, so you can omit them from the main transport configuration.
Step 3: Configure the plugin folder structure
The required plugin folder structure depends on the option you selected in Step 2.
Option 1: custom_headers
Place in a single folder, preserving this directory structure before creating the zip archive:env_var_plugin.py
<folder_name>/└── env_var_plugin.py
Option 2: Airflow Connection + token provider
Place and env_var_plugin.py into a single folder, preserving this directory structure before creating the zip archive:access_key_secret_token_provider.py
<folder_name>/├── env_var_plugin.py└── tokenproviders/ └── access_key_secret_token_provider.py
Step 4: Package and upload the plugins
Option 1: custom_headers
From inside the folder, create a zip file containing :env_var_plugin.py
zip -r plugins.zip env_var_plugin.py
Option 2: Airflow Connection + token provider
From inside the folder, create a zip file containing env_var_plugin.py and the token provider:
zip -r plugins.zip env_var_plugin.py tokenproviders/*
Upload (from Step 1) and requirements.txt to the S3 bucket linked to your MWAA environment.plugins.zip
Step 5: Update the MWAA environment
- Edit your MWAA environment settings.
- Update the paths for
andplugins.zipto point to the newly uploaded files.requirements.txt - Save the environment. MWAA restarts automatically to apply the changes.
Step 6: Verify the setup
After the environment becomes available, DAGs running in MWAA send OpenLineage events to the ADOC platform, enabling DAG monitoring and lineage tracking.
What's next
- To associate Airflow tasks that trigger dbt Cloud jobs with their pipeline runs, see Link Airflow Tasks to dbt Cloud Pipeline Runs in ADOC.
- To confirm your datasets link correctly to Catalog assets, see OpenLineage Asset Correlation.

Have a suggestion?