Prerequisites
- An AWS account
- An S3 bucket, or permission to create one
- IAM permissions to create users and policies
Step 1: Create an S3 bucket
- Open the Amazon S3 console
- Click Create bucket
-
Configure the bucket:
- Click Create bucket
Step 2: Create an IAM policy
- Go to the IAM console > Policies > Create policy
-
Select the JSON tab and paste:
Replace
YOUR_BUCKET_NAMEwith your bucket name. - Click Next
-
Name the policy (for example
CompilerStorageAccess) - Click Create policy
Step 3: Create an IAM user
- Go to IAM > Users > Create user
- Enter a username (for example
compiler-storage) - Click Next
- Select Attach policies directly
- Search for and select your policy (
CompilerStorageAccess) - Click Next > Create user
Step 4: Create access keys
- Click the user you just created
- Go to the Security credentials tab
- Under Access keys, click Create access key
- Select Application running outside AWS
- Click Next > Create access key
- Save these credentials securely:
- Access key ID:
AKIA... - Secret access key:
wJalrXUtnFEMI...
- Access key ID:
Step 5: Configure Compiler
- Log in to your instance as an admin
-
Go to Settings > Storage (or
/settings/storage) -
Enter your configuration:
- Click Save
Verify
- Open any conversation
- Upload a file (an image or document) with the file attachment button
- Confirm the file appears in the conversation
Remove the configuration
- Go to Settings > Storage
- Click Remove
- Confirm the removal when prompted
Troubleshooting
Access denied (403)
Access denied (403)
- Verify your IAM policy includes both
s3:PutObjectands3:GetObject - Confirm the policy
Resourcematches your bucket name exactly (arn:aws:s3:::YOUR_BUCKET/*) - Check that the access key ID and secret access key are correct
Invalid bucket name
Invalid bucket name
- Make sure the bucket name matches exactly, with no leading or trailing spaces
- Confirm the bucket exists in the specified region
Wrong region
Wrong region
- The region must match where your bucket was created (for example
us-east-1oreu-west-1) - Check your bucket’s region in the S3 console under Properties
Upload fails with a network error
Upload fails with a network error
- Verify your instance can reach
<bucket>.s3.<region>.amazonaws.com - Check that no firewall or proxy is blocking outbound HTTPS traffic to AWS
Uploads succeed but images don't show
Uploads succeed but images don't show
Browsers load uploaded files straight from the bucket. Check that people’s browsers can reach
<bucket>.s3.<region>.amazonaws.com, for example from your office network or VPN.