

# GitLab connector for Amazon AppFlow
<a name="connectors-gitlab"></a>

GitLab is an open source code repository and software development platform. If you're a GitLab user, your account contains data about your projects and repositories. You can use Amazon AppFlow to transfer data from GitLab to certain AWS services or other supported applications.

## Amazon AppFlow support for GitLab
<a name="gitlab-support"></a>

Amazon AppFlow supports GitLab as follows.

**Supported as a data source?**  
Yes. You can use Amazon AppFlow to transfer data from GitLab.

**Supported as a data destination?**  
No. You can't use Amazon AppFlow to transfer data to GitLab.

**Supported API version**  
Amazon AppFlow retrieves your data by sending requests to the GitLab v4 REST API.

## Before you begin
<a name="gitlab-prereqs"></a>

To use Amazon AppFlow to transfer data from GitLab to supported destinations, you must meet these requirements:
+ You have a GitLab account and one or more projects that contain the data that you want to transfer. For more information about the GitLab data objects that Amazon AppFlow supports, see [Supported objects](#gitlab-objects).
+ In the settings of your account, you've created either of the following resources for Amazon AppFlow. These resources provide credentials that Amazon AppFlow uses to access your data securely when it makes authenticated calls to your account.
  + An application, which provides OAuth 2.0 authentication. For the steps to create an application, see [User owned applications](https://docs.gitlab.com/ee/integration/oauth_provider.html#user-owned-applications) in the GitLab Docs.
  + A personal access token. For the steps to create one, see [Create a personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#create-a-personal-access-token) in the GitLab Docs.

    Your personal access token must permit the `api` scope.
+ If you created an application, you've configured it with the following settings:
  + You've specified a redirect URL for Amazon AppFlow.

    Redirect URLs have the following format:

    ```
    https://region.console.aws.amazon.com/appflow/oauth
    ```

    In this URL, *region* is the code for the AWS Region where you use Amazon AppFlow to transfer data from GitLab. For example, the code for the US East (N. Virginia) Region is `us-east-1`. For that Region, the URL is the following:

    ```
    https://us-east-1.console.aws.amazon.com/appflow/oauth
    ```

    For the AWS Regions that Amazon AppFlow supports, and their codes, see [Amazon AppFlow endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/appflow.html) in the *AWS General Reference.*
  + You've permitted the scopes that provide access to the data objects that you want to transfer. For information about GitLab OAuth 2.0 scopes, see [Authorized applications](https://docs.gitlab.com/ee/integration/oauth_provider.html#authorized-applications) in the GitLab Docs.

If you created an application, note the application ID and secret. If you created a personal access token, note the token value. You provide these values to Amazon AppFlow when you connect to your GitLab account.

## Connecting Amazon AppFlow to your GitLab account
<a name="gitlab-connecting"></a>

To connect Amazon AppFlow to your GitLab account, provide the credentials from your application, or provide a personal access token. If you haven't yet configured your GitLab account for Amazon AppFlow integration, see [Before you begin](#gitlab-prereqs).

**To connect to GitLab**

1. Sign in to the AWS Management Console and open the Amazon AppFlow console at [https://console.aws.amazon.com/appflow/](https://console.aws.amazon.com/appflow/).

1. In the navigation pane on the left, choose **Connections**.

1. On the **Manage connections** page, for **Connectors**, choose **GitLab**.

1. Choose **Create connection**.

1. In the **Connect to GitLab** window, for **Select authentication type**, choose how to authenticate Amazon AppFlow with your GitLab account when it requests to access your data:
   + Choose **OAuth2** to authenticate Amazon AppFlow with the credentials from an application. Then, enter the following values:
     + **Client ID** – The application ID.
     + **Client secret** – The secret.
   + Choose **PersonalAccessToken** to authenticate Amazon AppFlow with a personal access token. Then, enter the token value for **Personal access token**.

1. Optionally, under **Data encryption**, choose **Customize encryption settings (advanced)** if you want to encrypt your data with a customer managed key in the AWS Key Management Service (AWS KMS).

   By default, Amazon AppFlow encrypts your data with a KMS key that AWS creates, uses, and manages for you. Choose this option if you want to encrypt your data with your own KMS key instead.

   Amazon AppFlow always encrypts your data during transit and at rest. For more information, see [Data protection in Amazon AppFlow](data-protection.md).

   If you want to use a KMS key from the current AWS account, select this key under **Choose an AWS KMS key**. If you want to use a KMS key from a different AWS account, enter the Amazon Resource Name (ARN) for that key.

1. For **Connection name**, enter a name for your connection.

1. Depending on the authentication type that you chose, do one of the following:
   + If you chose **OAuth2**, choose **Continue**. Then, in the window that appears, sign in to your GitLab account, and grant access to Amazon AppFlow.
   + If you chose **PersonalAccessToken**, choose **Connect**.

On the **Manage connections** page, your new connection appears in the **Connections** table. When you create a flow that uses GitLab as the data source, you can select this connection.

## Transferring data from GitLab with a flow
<a name="gitlab-transfer-data"></a>



To transfer data from GitLab, create an Amazon AppFlow flow, and choose GitLab as the data source. For the steps to create a flow, see [Creating flows in Amazon AppFlow](create-flow.md).

When you configure the flow, choose the data object that you want to transfer. For the objects that Amazon AppFlow supports for GitLab, see [Supported objects](#gitlab-objects).

Also, choose the destination where you want to transfer the data object that you selected. For more information about how to configure your destination, see [Supported destinations](#gitlab-destinations).

## Supported destinations
<a name="gitlab-destinations"></a>

When you create a flow that uses GitLab as the data source, you can set the destination to any of the following connectors: 
+ [Amazon Lookout for Metrics](lookout.md)
+ [Amazon Redshift](redshift.md)
+ [Amazon RDS for PostgreSQL](connectors-amazon-rds-postgres-sql.md)
+ [Amazon S3](s3.md)
+ [HubSpot](connectors-hubspot.md)
+ [Marketo](marketo.md)
+ [Salesforce](salesforce.md)
+ [SAP OData](sapodata.md)
+ [Snowflake](snowflake.md)
+ [Upsolver](upsolver.md)
+ [Zendesk](zendesk.md)
+ [Zoho CRM](connectors-zoho-crm.md)

## Supported objects
<a name="gitlab-objects"></a>

When you create a flow that uses GitLab as the data source, you can transfer any of the following data objects to supported destinations:

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/appflow/latest/userguide/connectors-gitlab.html)