Overview of connection types - Amazon Managed Workflows for Apache Airflow

Overview of connection types

Apache Airflow stores connections as a connection URI string. It provides a connections template in the Apache Airflow UI to generate the connection URI string, regardless of the connection type. If a connection template is not available in the Apache Airflow UI, an alternate connection template can be used to generate this connection URI string, such as using the HTTP connection template. The primary difference is the URI prefix, such as my-conn-type://, which Apache Airflow providers typically ignore for a connection. This page describes how to use connection templates in the Apache Airflow UI interchangeably for different connection types.

What's changed in v2

Example connection URI string

The following example shows a connection URI string for the MySQL connection type.

'mysql://288888a0-50a0-888-9a88-1a111aaa0000.a1.us-east-1.airflow.amazonaws.com%2Fhome?role_arn=arn%3Aaws%3Aiam%3A%3A001122332255%3Arole%2Fservice-role%2FAmazonMWAA-MyAirflowEnvironment-iAaaaA&region_name=us-east-1'

Example connection template

The following example shows the HTTP connection template in the Apache Airflow UI.

Apache Airflow v2

The following example shows the HTTP connection template for Apache Airflow v2 in the Apache Airflow UI.


                This image shows the HTTP connection type in the Apache Airflow UI.
Apache Airflow v1

The following example shows the HTTP connection template for Apache Airflow v1 in the Apache Airflow UI.


              This image shows the HTTP connection type in the Apache Airflow UI.

Example using an HTTP connection template for a Jdbc connection

The following example shows how to use the HTTP connection template for a Jdbc connection type in Apache Airflow v2.0.2, and the same values in the Jdbc connection template for Apache Airflow v1.10.12 in the Apache Airflow UI.

Apache Airflow v2

The following example shows the connection URI string generated by Apache Airflow for the example in this section.

http://myconnectionurl/some/path&login=mylogin&extra__jdbc__dry__path=usr/local/airflow/dags/classpath/redshif-jdbc42-2.0.0.1.jar&extra__jdbc__dry__clsname=redshift-jdbc42-2.0.0.1

The following example shows how to use the HTTP connection template for a Jdbc connection for Apache Airflow v2 in the Apache Airflow UI.


                  This image shows the HTTP connection type for a Jdbc connection in the Apache Airflow UI.
Apache Airflow v1

The following example shows the connection URI string generated by Apache Airflow for the example in this section.

jdbc://myconnectionurl/some/path&login=mylogin&extra__jdbc__dry__path=usr/local/airflow/dags/classpath/redshif-jdbc42-2.0.0.1.jar&extra__jdbc__dry__clsname=redshift-jdbc42-2.0.0.1

The following example shows the Jdbc connection template for Apache Airflow v1.10.12 in the Apache Airflow UI.


                This image shows the Jdbc connection type in the Apache Airflow UI.