Create AWS Connection for Private S3 Assets
AWS Integration
Create AWS Connection for Private S3 Assets
Connect your AWS account to access private S3 videos and images in Pictory
POST
Create AWS Connection for Private S3 Assets
Documentation Index
Fetch the complete documentation index at: https://docs.pictory.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
This guide shows you how to connect your private AWS S3 storage to Pictory, so you can use your own videos and images stored in Amazon S3 buckets to create Pictory videos. What you will accomplish:- Connect Pictory to your private AWS S3 storage
- Use your private videos and images in Pictory without making them public
- Keep your assets secure with AWS IAM role-based access
Prerequisites: You will need an AWS account with access to create IAM roles. If you do not have AWS experience, consider asking your IT team for help with the AWS setup steps below.
Prerequisites: AWS IAM Role Setup
This creates a secure “key” (called an IAM role) that lets Pictory access your private S3 files without making them public.How It Works
Think of this like giving Pictory a guest pass to your storage:- You create a special role in AWS (the “guest pass”)
- You tell AWS that Pictory is allowed to use this role
- You specify which folders/buckets Pictory can access
- Pictory uses this role to fetch your videos and images when creating content
Step 1: Log in to AWS Console
- Go to AWS Management Console
- Sign in with your AWS account credentials
- In the search bar at the top, type “IAM” and click on the IAM service
Step 2: Start Creating a New Role
- On the left sidebar, click Roles
- Click the orange Create role button
Step 3: Set Up Trust with Pictory
This step tells AWS that Pictory’s account is allowed to use this role.
- Under Trusted entity type, select Another AWS account
- In the Account ID field, enter:
701488979254(this is Pictory’s AWS account) - Click Next
- On the permissions page, click Next (we will add permissions in the next step)
- Under Role name, enter exactly:
PictoryCloudIntegrationRole(this exact name is required) - Click Create role
Step 4: Give Permission to Access Your S3 Bucket
This step specifies which S3 bucket Pictory can access and what it can do (read files and list files).
- In the search box, find the role you just created:
PictoryCloudIntegrationRole - Click on it to open the role details
- Click the Permissions tab
- Click Add permissions → Create inline policy
- Click the JSON tab (ignore the visual editor)
- Delete everything in the box and paste this:
- Important: Replace
{YOUR_S3_BUCKET}with your actual bucket name (for example, if your bucket is named “my-company-videos”, replace both instances with “my-company-videos”) - Click Next
- Name the policy:
s3_access_policy - Click Create policy
Step 5: Configure Trust Relationship (Advanced)
This step sets up the detailed trust relationship between your AWS account and Pictory.
- In the role details, click the Trust relationships tab
- Click Edit trust policy
- Delete everything and paste this:
- Click Update policy
Step 6: Gather Information for API Call
You’ll need these two pieces of information to make the API call:Your AWS Account ID:
- In the AWS Console, click your account name in the top-right corner
- Your 12-digit Account ID is shown there (for example:
123456789012)
- Go to the S3 service in AWS Console
- Find your bucket in the list
- The region is shown next to the bucket name (for example:
us-east-1,us-west-2, etc.)
Making the API Call
Now that your AWS role is set up, you can make a simple API call to connect it to Pictory. What you will need:- Your API key (starts with
pictai_- get this from the API Access page) - Your 12-digit AWS Account ID (from Step 6 above)
- Your S3 bucket’s region (from Step 6 above)
API Endpoint
Request Parameters
Headers
API key for authentication (starts with Get your API key from the API Access page in your Pictory dashboard.
pictai_)Must be set to
application/jsonBody Parameters
A unique name for the AWS connectionExample:
"PictoryPrivateVideosConnection"Optional description of the AWS connectionExample:
"Pictory Private Videos Connection"Your 12-digit AWS account IDFormat: 12-digit numeric stringExample:
"123456789012"The AWS region where your S3 bucket is locatedCommon Regions:
us-east-1- US East (N. Virginia)us-east-2- US East (Ohio)us-west-1- US West (N. California)us-west-2- US West (Oregon)eu-west-1- Europe (Ireland)eu-central-1- Europe (Frankfurt)ap-southeast-1- Asia Pacific (Singapore)ap-northeast-1- Asia Pacific (Tokyo)
"us-east-2"Whether the AWS connection is enabled (should be
true to activate the connection)Default: trueRequest Body Example
Here’s what the complete request looks like. Replace the example values with your actual AWS details:Response
When the connection is successful, Pictory will send back a response confirming the details.Response Examples
Code Examples
Here are complete working examples in different programming languages. Pick the one that matches your programming language.Using Your S3 Assets in Videos
Now that you have created the connection, you can use your private S3 files in Pictory videos by including theawsConnectionId and referencing files with the s3:// format.
Example Video Request
Here is a simple example of creating a video using your private S3 files:How to Reference Your S3 Files
You can use either of these two formats to point to your S3 files:- S3 Protocol (Recommended)
- HTTPS URL
Troubleshooting
Invalid AWS Account ID
Invalid AWS Account ID
Make sure your Account ID is exactly 12 digits (example:
123456789012) with no spaces or dashes.Where to find it: In AWS Console, click your account name in the top-right cornerUnauthorized Error
Unauthorized Error
Duplicate Connection Error
Duplicate Connection Error
You already have a connection with this name or AWS account/region. Try a different connection name.
Videos Can't Access S3 Files
Videos Can't Access S3 Files
Check these in order:
- Role name must be exactly:
PictoryCloudIntegrationRole - Bucket name in your S3 URIs must match your IAM policy
- Region must match where your S3 bucket is located
- Trust policy includes all three Pictory roles (from Step 5)
Get API Key
Access your API key from your Pictory dashboard
Video Storyboard API
Create videos using your private S3 assets
Get AWS Connections
Retrieve all your configured AWS connections
Update AWS Connection
Modify or disable an existing connection
Delete AWS Connection
Remove an AWS connection
AWS IAM Documentation
Official AWS IAM documentation
