Steps to Create an AWS IAM Role with Trust Relationship for Pictory AWS Account to Access Videos or Images in a Private S3 Bucket to Create Videos using Private Media Assets

This guide explains how to create an AWS IAM Role with a trusted entity type set to "AWS Account", specifically allowing access for Another (Pictory) AWS Account ID: 701488979254.

Step 1: Log in to the AWS Management Console

  1. Open the AWS Management Console.
  2. Navigate to the IAM service by searching for "IAM" in the search bar.

Step 2: Create a New Role

  1. In the IAM Dashboard, click on Roles in the left navigation pane.
  2. Click the Create role button.

Step 3: Select Trusted Entity

  1. Under Trusted entity type, select Another AWS account.
  2. Enter the Account ID: 701488979254.
  3. Click Next and go to Add permissions.
  4. Skip Add permissions and click Next.
  5. Enter Role name PictoryCloudIntegrationRole and click Create role.

Step 4: Attach Inline Policy

  1. Go to Roles in IAM and search for PictoryCloudIntegrationRole.
  2. On the Permissions tab, click Add permissions and select Create inline policy.
  3. After proceeding, on the Specify permissions, go to the JSON tab and paste the following policy document:
    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Effect": "Allow",
                "Action": [
                    "s3:ListBucket",
                    "s3:GetObject"
                ],
                "Resource": [
                    "arn:aws:s3:::{YOUR_S3_BUCKET}",
                    "arn:aws:s3:::{YOUR_S3_BUCKET}/*"
                ]
            },
            {
                "Effect": "Allow",
                "Action": [
                    "s3:ListAllMyBuckets"
                ],
                "Resource": [
                    "arn:aws:s3:::*"
                ]
            }
        ]
    }
    

  4. Replace {YOUR_S3_BUCKET} with the name of your S3 bucket.
  5. Click Review policy, give it a name (e.g., s3_access_policy), and save.

Step 5: Configure Trust Relationship

  1. Go to Roles in IAM and search for PictoryCloudIntegrationRole.
  2. Go to the Trust relationships tab.
  3. Click Edit trust policy.
  4. Replace the existing trust policy with the following JSON:
    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Effect": "Allow",
                "Principal": {
                    "AWS": "arn:aws:iam::701488979254:role/CloudIntegrationRole"
                },
                "Action": "sts:AssumeRole",
                "Condition": {}
            },
            {
                "Effect": "Allow",
                "Principal": {
                    "AWS": "arn:aws:iam::701488979254:role/ecsTaskExecutionRole"
                },
                "Action": "sts:AssumeRole",
                "Condition": {}
            },
            {
                "Effect": "Allow",
                "Principal": {
                    "AWS": "arn:aws:iam::701488979254:root"
                },
                "Action": "sts:AssumeRole",
                "Condition": {}
            }
        ]
    }
    
  5. Save the changes.

Your PictoryCloudIntegrationRole Role is Now Ready for Use!

The created PictoryCloudIntegrationRole role is now configured to allow trusted access to AWS Account ID 701488979254 and grant permissions for the specified S3 buckets and actions.

API Documentation: Register AWS Connection in Pictory

API Endpoint

Make a POST request to the API endpoint:
https://api.pictory.ai/pictoryapis/v1/awsconnections

Request Structure

CURL Command:

curl --request POST \
     --url https://api.pictory.ai/pictoryapis/v1/awsconnections \
     --header 'Authorization: <access_token>' \
     --header 'X-Pictory-User-Id: <Your-Pictory-User-ID>' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "name": "PictoryPrivateVideosConnection",
  "description": "Pictory Private Videos Connection",
  "awsAccountId": "<YOUR_12_DIGIT_AWS_ACCOUNT>",
  "awsRegion": "<YOUR_S3_BUCKET_REGION>",
  "enabled": true
}

Request Body Parameters:

FieldTypeRequiredDescription
nameStringYesA unique name for the AWS connection.
descriptionStringNoA brief description of the AWS connection.
awsAccountIdStringYesThe 12 Digit AWS account ID associated with the connection.
awsRegionStringYesThe S3 bucket AWS Region. Example: us-east-2.
enabledBooleanYesSpecifies whether the AWS connection is enabled.

Example Request Body:

{
  "enabled": true,
  "name": "PictoryPrivateVideosConnection",
  "description": "Pictory Private Videos Connection",
  "awsAccountId": "<YOUR_12_DIGIT_AWS_ACCOUNT>",
  "awsRegion": "<YOUR_S3_BUCKET_REGION>"
}

Headers

HeaderValueDescription
Authorization<access_token>Token for API access.
X-Pictory-User-Id<Your-Pictory-User-ID>Unique identifier for the user provided by Pictory.
content-typeapplication/jsonSpecifies the request payload format.

Example Response

Successful Response:

{
  "enabled": true,
  "name": "PictoryPrivateVideosConnection",
  "description": "Pictory Private Videos Connection",
  "awsAccountId": "<YOUR_12_DIGIT_AWS_ACCOUNT>",
  "awsRegion": "<YOUR_S3_BUCKET_REGION>",
  "connectionId": "20241207042423053xmex5z9ag9ivmp21",
  "version": 1
}

Response Fields:

FieldTypeDescription
nameStringThe unique name of the AWS connection.
descriptionStringThe description of the AWS connection.
awsAccountIdStringThe 12 digit AWS account ID associated with the connection.
awsRegionStringThe S3 bucket AWS Region.
connectionIdStringA unique identifier for the created AWS connection.
enabledBooleanIndicates whether the AWS connection is enabled.
versionNumberThe version number of the AWS connection configuration.

Notes
The awsAccountId and awsRegion should match the details of your AWS setup and awsRegion should be S3 bucket region.

Using AWS Connection ID and Private Media Assets in Video Storyboard Request

Example Request

{
    "awsConnectionId": "20241207042423053xmex5z9ag9ivmp21",
    "videoName": "test_video",
    "videoDescription": "test video",
    "language": "en",
    "audio": {
        "autoBackgroundMusic": true,
        "backGroundMusicVolume": 0.5
    },
    "scenes": [
        {
            "text": "Hello world! Good morning!",
            "voiceOver": false,
            "splitTextOnNewLine": false,
            "splitTextOnPeriod": false,
            "backgroundUri": "s3://{YOUR_S3_BUCKET}/hello_world.mp4",
            "backgroundType": "video",
            "loopBackgroundVideo": true,
            "muteBackgroundVideo": true,
            "minimumDuration": 5
        },
        {
            "text": "Welcome and have a wonderful day ahead!",
            "voiceOver": false,
            "splitTextOnNewLine": false,
            "splitTextOnPeriod": false,
            "backgroundUri": "https://{YOUR_S3_BUCKET}.s3.us-east-1.amazonaws.com/welcome_everyone.mp4",
            "backgroundType": "video",
            "loopBackgroundVideo": true,
            "muteBackgroundVideo": true,
            "minimumDuration": 5
        }
    ]
}

Notes

  • Private Media Access: Ensure the awsConnectionId corresponds to the AWS connection that has permissions for the private S3 assets.
  • Background URIs: Private S3 URIs could be in the format s3://{YOUR_S3_BUCKET}/key, or https://{YOUR_S3_BUCKET}.s3.region.amazonaws.com/key format.

Try request here

Language
Click Try It! to start a request and see the response here!