- Newest
- Most votes
- Most comments
The above answer is not correct. The Airflow configuration mentioned in the answer controls whether users of the Airflow UI are able to view the current environment configurations.
For security reasons, Airflow by default will disable the ability to test connections from the Airflow UI. This configuration can be overridden using the Airflow configuration, AIRFLOW__CORE__TEST_CONNECTION.
This configuration has the following options:
- Disabled (Default value) - Fully disables test connection functionality and disables the test connection button in the Airflow UI.
- Enabled - Enables test connection functionality and shows the button in the Airflow UI.
- Hidden - Fully disables test connection functionality and hides the button in the Airflow UI.
In MWAA environments using Airflow 2.7.2 and above, this can be set either by:
- Setting the Airflow configuration option in a
CreateEnvironmentorUpdateEnvironmentAPI call using the key value pair, Key :core.test_connection, Value :Enabled - Set using the environment variable
AIRFLOW__CORE__TEST_CONNECTIONtoEnabledusing a startup script.
Airflow Connections: https://airflow.apache.org/docs/apache-airflow/stable/howto/connection.html#testing-connections
Airflow Configuration Options: https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#test-connection
To enable the test connection feature in the connection tab of Amazon Managed Workflows for Apache Airflow (MWAA), you need to add the correct Airflow configuration option. However, the configuration options you've tried are not correct for this purpose.
Instead, you should follow these steps to add the correct configuration:
- Open the Environments page on the Amazon MWAA console.
- Select your environment.
- Choose "Edit".
- Click "Next".
- In the "Airflow configuration options" pane, choose "Add custom configuration".
- In the dropdown list, select "webserver.expose_config" or type it if it's not available.
- Set the value to "True".
- Click "Save".
The correct configuration option is:
webserver.expose_config = True
This configuration exposes certain configurations in the Airflow UI, including the ability to test connections. After applying this change, you should be able to use the test connection feature in the connection tab of your MWAA environment.
Remember that changes to the Airflow configuration may take a few minutes to propagate throughout your environment. If you don't see the change immediately, wait a short while and then refresh the Airflow UI.
Also, keep in mind that exposing configurations can have security implications, so ensure that this aligns with your security requirements.
Sources
Using Apache Airflow configuration options on Amazon MWAA - Amazon Managed Workflows for Apache Airflow
Relevant content
- asked 2 years ago
- asked 4 years ago

I can see the test connection button by default but can't click them, so I try to enable it in the configuration in AWS MWAA Environment (Not via Airflow UI since it doesn't allow to change the config from UI). Even after webserver.expose_config = True I still can't test my connection