How to set up Amazon S3 (optional)

Who it is for: whoever manages the account

What it is for

The media files (images, videos, audio, documents) that are sent and received are saved in storage. Amazon S3 is optional: if you do not load credentials, TalkAI saves them on the server's disk and everything works the same. Set up S3 only if you want the files to live in your own bucket.

Step 1: Create an AWS account

Step 2: Create an S3 bucket

- Bucket name: for example talkai-media (must be globally unique).

- Region: for example us-east-1.

- Block all public access: leave it on (files are served with signed URLs).

Step 3: Configure CORS on the bucket


[

{

"AllowedHeaders": ["*"],

"AllowedMethods": ["GET", "PUT"],

"AllowedOrigins": ["*"],

"ExposeHeaders": []

}

]

Step 4: Create an IAM user with limited permissions

Do not use the AWS root credentials. Create a dedicated user:


{

"Version": "2012-10-17",

"Statement": [

{

"Effect": "Allow",

"Action": [

"s3:PutObject",

"s3:GetObject"

],

"Resource": "arn:aws:s3:::YOUR-BUCKET-NAME/*"

}

]

}

Step 5: Get the Access Keys

Step 6: Load the data into TalkAI

Verification

From a conversation in the Inbox try sending an image, or ask a contact to send you a photo. It should display in the chat.

Common errors

ProblemFix
"Access Denied" when uploadingThe IAM policy must include s3:PutObject for your bucket
Images do not displayThe policy must include s3:GetObject
"NoSuchBucket"Check that the bucket name is correct, with no spaces
Files do not downloadCheck the bucket's CORS configuration