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
- Go to aws.amazon.com and click Create an AWS account.
- Fill in the form with your details.
- Choose the Basic Support (free) plan.
Step 2: Create an S3 bucket
- Sign in to the AWS console: console.aws.amazon.com.
- Search for S3 and click the service.
- Click Create bucket.
- Configure:
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).
- Click Create bucket.
Step 3: Configure CORS on the bucket
- In S3, open your bucket and go to the Permissions tab.
- In CORS (Cross-origin resource sharing), click Edit.
- Paste this configuration and save:
[
{
"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:
- Go to IAM > Users > Create user (for example
talkai-s3). - For permissions, choose Attach policies directly and create a custom policy in the JSON tab:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject"
],
"Resource": "arn:aws:s3:::YOUR-BUCKET-NAME/*"
}
]
}
- Replace
YOUR-BUCKET-NAMEwith the real name of your bucket. - Save the policy and attach it to the user.
Step 5: Get the Access Keys
- Open the user you created and go to Security credentials.
- Under Access keys, click Create access key and choose Application running outside AWS.
- Copy the Access Key ID and the Secret Access Key. The secret is shown only once.
Step 6: Load the data into TalkAI
- In TalkAI, go to Settings > External APIs.
- Open the AWS section and fill in Access Key ID, Secret Access Key, bucket name and region.
- Click Save.
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
| Problem | Fix |
|---|---|
| "Access Denied" when uploading | The IAM policy must include s3:PutObject for your bucket |
| Images do not display | The policy must include s3:GetObject |
| "NoSuchBucket" | Check that the bucket name is correct, with no spaces |
| Files do not download | Check the bucket's CORS configuration |