1. Set up an integration

An integration grants Twelve Labs access to read the files in your S3 bucket. Before you can use the cloud-to-cloud transfer feature, you must set up an integration by following the steps in this section.

Prerequisites

  • You’re familiar with the concepts that are described on the Platform overview page.
  • You’ve already created an index. For details about creating an index, see the Create indexes page.
  • Your videos must meet the following requirements:
    • Video resolution: Must be greater or equal than 360p and less or equal than 4K. For consistent search results, Twelve Labs recommends you upload 360p videos.
    • Video and audio formats: The video files you wish to upload must be encoded in the video and audio formats listed on the FFmpeg Formats Documentation page. For videos in other formats, contact us at [email protected].
    • Duration: For Marengo, it must be between 4 seconds and 2 hours (7,200s). For Pegasus, it must be between 4 seconds and 20 minutes (1200s). In a future release, the maximum duration for Pegasus will be 2 hours (7,200 seconds).
    • File size: Must not exceed 2 GB.
      If you require different options, contact us at [email protected].
    • Audio track: If the conversation engine option is selected, the videos you're uploading must contain an audio track.
  • Before starting this procedure, make sure you have the following information available:
  • Your bucket must be in the us-west-2 region.

Procedure

  1. Go to the Dashboard page.

  2. From the sidebar, choose Integrations. Then, select Add Integration > AWS S3:

  3. In the Integrate AWS S3 modal, enter your AWS ID and bucket name. Then, select the Next button:

Create an AWS policy

  1. Open the IAM Dashboard page in a new window or tab.

  2. From the sidebar, choose Policies. Then, select the Create Policy button:

  3. Select the JSON tab:

  4. Move to the Twelve Labs Dashboard page, and copy the JSON snippet under Step 1 : Create Policy:

  5. Move to the IAM Dashboard page, and replace the content of the JSON tab with the snippet you've copied in the previous step. Then, select the Next button:

  6. On the Review Policy page, set the name of the policy to "TwelvelabsIntegrationPolicy" and enter a brief description. Then, select the Create Policy button:

    🚧

    Note

    Do not change the name of the policy. If you rename the policy, the integration will not work.

  7. On the Policies page, make sure that the system displays your new policy:

    If the system does not display your policy, review the steps in this section, making sure all the information you entered is correct.

Create an AWS role

  1. From the sidebar, choose Roles. Then, select the Create Role button:

  2. Under Trusted Entity Type, select Custom Trust Policy:

  3. Move to the Twelve Labs Dashboard page, and copy the JSON snippet under Step 2 : Create Role:

  4. Move to the IAM Dashboard page, and replace the content of the Custom trust policy box with the snippet you've copied in the previous step. Then, select the Next button:

  5. On the Add Permissions page, select the policy you've created in the previous section. Then, select the Next button at the bottom-right corner of the page:

  6. On the Name, Review, and Create page, set the name of the role to "TwelvelabsIntegrationRole" and enter a brief description. Then, select the Create Role button:

    🚧

    Note

    Do not change the name of the role. If you rename the role, the integration will not work.

  7. On the Roles page, make sure that the system displays your new role:

    If the system does not display your role, review the steps in this section, making sure all the information you entered is correct.

Verify your integration configuration

  1. Move to the Twelve Labs Dashboard page. Under Step 3 : Check Verification, select the Verify My Account button:

    If everything went well, you should see a message saying "Verification successful!":

  2. Select the Next button:

  3. On the Connected Integrations page, make sure that the status of your new integration shows as Active:

    When the status of your integration shows as Active, it means that the API service can access the videos in your S3 bucket. If the status does not show as Active, review the steps in this section, making sure all the information you entered is correct.