AWS S3
Connect an S3 bucket and bannx writes your space's files to it instead of its own storage: stored renders, template thumbnails and media library uploads. The URLs bannx returns, such as url from the Rendering API, then point at your bucket or your CDN domain. Any S3-compatible service works the same way, including Cloudflare R2 and MinIO.
What goes to your bucket
- Renders that are stored: every JSON response of the Render API (the
urlit returns),render_templateover MCP, and renders the app saves to your space. Araw: truerender is streamed back to you and never stored anywhere. - Template thumbnails baked when you publish.
- Media library uploads, plus images you generate and save to the library.
Objects are written under wks/<spaceId>/<fileId>_<filename>, with Cache-Control: public, max-age=31536000, immutable. Keys never repeat, so a CDN can cache every object for a year.
Connecting a bucket does not move files you already have. Each file keeps the URL it was stored with, and only new files go to the bucket.
Prerequisites
- An S3 bucket (or an S3-compatible bucket) and its region.
- An access key (Access Key ID + Secret Access Key) for an IAM user or token that can write to that bucket only.
- Owner or admin role in the bannx space.
Connect AWS S3
- In bannx, open Settings → Space → Integrations.
- On the Discover tab, find AWS S3 and click Connect.
- Fill in the fields below. Test connection checks the credentials against the bucket before you save.
- Click Save. The connection appears on the Manage tab. Its switch turns it off and on.
| Field | Required | Description |
|---|---|---|
| Access Key ID | Yes | IAM access key, e.g. AKIA… |
| Secret Access Key | Yes | Secret for the access key |
| Region | Yes | The bucket's region, e.g. us-east-1 (auto for Cloudflare R2) |
| Bucket | Yes | Target bucket name |
| CDN URL | No | Public base URL for files, e.g. https://cdn.example.com. File URLs become <CDN URL>/wks/… |
| Endpoint | No | S3 API URL for S3-compatible providers (R2, MinIO) |
Only an active connection is used. Switch it off and new files go back to bannx's own storage. Files already in your bucket keep their URLs, so leave them in place.
IAM policy
Grant the key exactly what bannx uses on that one bucket:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "BannxObjects",
"Effect": "Allow",
"Action": ["s3:PutObject", "s3:PutObjectAcl", "s3:GetObject", "s3:DeleteObject"],
"Resource": "arn:aws:s3:::YOUR_BUCKET/*"
},
{
"Sid": "BannxTestConnection",
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::YOUR_BUCKET"
}
]
}
PutObjectwrites files. With no Endpoint, bannx uploads each object with thepublic-readACL, which needsPutObjectAcl.GetObjectreads an upload back to make its thumbnail and colour data.DeleteObjectonly cleans up an upload that failed halfway. Deleting a file in the media library does not delete the object from your bucket, so set a lifecycle rule if you want old objects to expire.ListBucket(on the bucket ARN, not/*) is what Test connection checks. It lists at most one key.
Public access
Browsers and social networks fetch the URLs bannx hands out, so the objects have to be publicly readable at those URLs.
Leave Endpoint empty for AWS S3. bannx uploads each object as public-read. In the bucket's Permissions:
- Object Ownership: ACLs enabled (Bucket owner preferred). A bucket with ACLs disabled refuses the upload.
- Block public access: turn off the two settings that block public ACLs.
Without a CDN URL, files are served from https://YOUR_BUCKET.s3.amazonaws.com/wks/….
CORS
The editor draws your images on a WebGL canvas, which needs CORS on cross-origin images. Allow the origin you open bannx on in the bucket's CORS configuration (and pass the CORS headers through your CDN):
[
{
"AllowedOrigins": ["https://bannx.com"],
"AllowedMethods": ["GET", "HEAD"],
"AllowedHeaders": ["*"],
"MaxAgeSeconds": 3600
}
]
S3-compatible providers
| Provider | Endpoint | Region | CDN URL |
|---|---|---|---|
| Cloudflare R2 | https://<account_id>.r2.cloudflarestorage.com | auto | Required. The bucket's public r2.dev URL or its custom domain |
| MinIO | Your MinIO server's public https:// URL | Your MinIO region, e.g. us-east-1 | Optional. Without it files are served from <endpoint>/<bucket>/wks/… |
With an Endpoint, bannx uses path-style requests and sends no ACLs, so public read access is set on the provider's side. Without a CDN URL, file URLs point at the S3 API endpoint (<endpoint>/<bucket>/…), which R2 does not serve publicly. For R2, create an API token with Object Read & Write on that bucket and use its access key ID and secret.
Common problems
| Message or symptom | Cause and fix |
|---|---|
Bucket "…" was not found. | The bucket name is misspelled, or the Region or Endpoint points somewhere else. |
Invalid Access Key ID. / Invalid Secret Access Key. | Re-copy the key pair. Check for trailing spaces and for a deactivated or deleted key. |
Access denied. Check the key permissions for this bucket. | The policy lacks s3:ListBucket on arn:aws:s3:::YOUR_BUCKET (the test) or the object actions on YOUR_BUCKET/*. |
| Test passes, but uploads fail | On AWS without an endpoint, the bucket has ACLs disabled or blocks public ACLs, or the key lacks s3:PutObjectAcl. Follow Public access above. |
File URLs return 403 | The objects are not publicly readable at that URL. On R2 or MinIO, set a CDN URL that serves the bucket publicly. On AWS, follow Public access above. |
| Images load in a new tab but not on the canvas | CORS. Add your bannx origin to the bucket's CORS configuration and let the CDN pass the headers through. |
| URLs miss a path segment of the CDN URL | A CDN URL with a path needs a trailing slash: https://cdn.example.com/assets/. |
HTTPS certificate warning on *.s3.amazonaws.com | The bucket name contains dots. Serve it through a CDN URL. |
FAQ
Are my credentials visible to other members? Only space owners and admins can open, change or remove the connection. Credentials are stored against your space and used by bannx's servers to write to the bucket.
One bucket for several spaces? Yes. Each space connects separately, and keys are prefixed with the space id (wks/<spaceId>/…), so spaces never overwrite each other.
Do raw renders use my bucket? No. raw: true returns the bytes in the response and stores nothing.
What happens if the bucket stops accepting writes? Uploads fail until the connection is fixed or switched off. Switching it off sends new files to bannx's storage.
Related: Integrations · Rendering API · Templates