Redshift native Experimentation

Contact us for help with configuring Redshift native Experimentation

If you have both Data Export and Experimentation enabled for your LaunchDarkly account, you should have access to Redshift native Experimentation. If you do not have access or need help getting started, contact your LaunchDarkly representative or start a Support ticket.

Overview

This topic explains how to set up the Redshift warehouse native Experimentation integration. Redshift native Experimentation enables you to run experiments in LaunchDarkly using data directly from your Amazon Redshift data warehouse. This lets LaunchDarkly to read and analyze your metrics data stored in Redshift to power your experiment results, without requiring you to send event data through LaunchDarkly’s SDKs.

Before you can begin running Redshift native experiments, you must configure the Redshift Data Export integration in LaunchDarkly.

Prerequisites

Before setting up Redshift native Experimentation, ensure that you have:

Step 1: Gather your Redshift cluster information

To begin, collect the following information about your Redshift cluster:

  • The full cluster endpoint URL, similar to my-cluster.abc123.us-east-1.redshift.amazonaws.com
  • Your cluster’s unique identifier, similar to my-redshift-cluster
  • The region where your AWS cluster is deployed, such as us-east-1
  • Your 12-digit AWS account ID
  • The name of the database containing your metrics data
  • The name of the schema within the database where metrics tables are located

You can collect this information from your cluster’s “General information” screen:

An AWS Redshift cluster general information screen.

An AWS Redshift cluster general information screen.

Step 2: Configure the LaunchDarkly integration

This step collects your connection details you gathered in the previous section and generates the IAM policy you’ll use in the next step. This integration looks similar to the Redshift Data Export integration, but is a separate integration requiring a separate setup process.

To set up the integration:

Navigate to the Integrations page. 2. Search for and select Redshift Native Experimentation. Click Add integration. The configuration panel appears. 4. Enter an integration Name. 5. Select the LaunchDarkly Project and environment for this integration. You cannot change this after you save the integration. 6. Enter your Redshift endpoint cluster URL. 7. Enter your Redshift cluster identifier. 8. Enter the Redshift cluster region where your cluster is deployed.

The Redshift native Experimentation configuration screen.

The Redshift native Experimentation configuration screen.
  1. Enter your 12-digit Redshift cluster AWS account ID.
  2. LaunchDarkly automatically populates the following fields. Copy and save the JSON and SQL from these fields for use in the next section.
    • IAM policy
    • Trust Policy JSON
    • SQL Setup Script

The IAM policy JSON in LaunchDarkly.

The IAM policy JSON in LaunchDarkly.
  1. Enter the Metrics database name containing your metrics data.
  2. (Optional) Enter the Metrics schema name containing your metrics tables.
  3. LaunchDarkly automatically populates the SQL setup script field. Copy and save the SQL for use in the next section.
  4. Click Create.

Next, you will create AWS Resources using the JSON and SQL you copied and saved in this section. Leave the LaunchDarkly integration page open, as you will return to it t the end of the next section.

Step 3: Create AWS resources

Use the JSON and SQL scripts you saved in the previous section to create the required resources in your AWS account.

Create the IAM policy

  1. In the AWS console, navigate to IAM > Policies
  2. Click Create policy.
  3. Select the JSON tab.
  4. Paste the IAM Policy JSON you copied from LaunchDarkly.
  5. Click Next.
  6. Enter a policy name, such as LaunchDarklyRedshiftAccess.
  7. Click Create policy.

Create the IAM role

To create the IAM Role:

  1. In the AWS Console, navigate to IAM > Roles.
  2. Click Create role.
  3. Select Custom trust policy.
  4. Paste in the trust policy JSON you copied from LaunchDarkly in step 2.

The custom trust policy in Redshift.

The custom trust policy in Redshift.
  1. Click Next.
  2. Search for and select the policy you created in the previous section, such as LaunchDarklyRedshiftAccess.
  3. Click Next.
  4. Provide a role name, such as LaunchDarklyRedshiftRole.
  5. Click Create role.
  6. Copy and save the Role ARN from the role summary page.
  7. Return to the LaunchDarkly integration configuration page and paste the Role ARN into the AWS IAM Role ARN field.

The IAM Role ARN in Redshift.

The IAM Role ARN in Redshift.

Configure the Redshift database

Next, configure the Redshift database:

  1. Follow AWS’s instructions to connect to your Redshift cluster using your preferred SQL client.
  2. Paste and run the SQL setup script you copied from LaunchDarkly in Step 2. The SQL script includes several comments to assist with your Redshift configuration.

The script creates the required database user and grants the necessary permissions for LaunchDarkly to read your metrics data.

Step 4: Configure network access

Ensure your Redshift cluster can receive connections from LaunchDarkly’s infrastructure by whitelisting the following IP addresses:

  1. Navigate to your Redshift cluster in the AWS console.
  2. Go to Properties > Network and security.
  3. Edit the VPC security group.
  4. Add inbound rules for each of the following IPs. Set the Type to “Custom TCP” and the Port to “5439”:

Step 5: Verify the connection

Finally, verify the connection. On the integration configuration page, check the “Connection status” indicator. Successful connections are indicated by a green checkmark and display a “Connected” status.

If you encounter issues with your setup, you can take the following actions:

  • Check the integration status in LaunchDarkly for error messages
  • Review your AWS CloudTrail logs for IAM role assumption attempts
  • Check your Redshift system tables for connection and query logs

If you are still having trouble with your connection contact LaunchDarkly Support with the following information:

  • Your integration configuration ID
  • Any error messages from the connection status
  • Your AWS CloudTrail logs, if available
  • Your Redshift cluster configuration details, including endpoint, region, and version

Next steps

Read the following topics to understand how to create a Redshift native experiment and analyze the experiment results:

The results page for a warehouse native experiment displays the date and time the results were last updated from Redshift. The initial load of experiment results can take up to 60 minutes to appear, and further results updates appear within 15–30 minutes.