How to host a Framer export on Amazon S3
To host a Framer export on Amazon S3, create a bucket with static website hosting, make it public, and run aws s3 sync ./exported-site s3://my-bucket --delete. Put CloudFront in front for HTTPS. Use routing rules or object redirects for renamed pages, and replace Framer forms, since S3 cannot receive a POST.
Last reviewed
Key facts
- Framer says a published site cannot be exported as plain HTML, so the copy is a saved render.
- S3 routing rules are limited to 50 per website configuration.
- A routing rule matches by key prefix and rewrites the prefix with ReplaceKeyPrefixWith.
- aws s3api put-bucket-website applies the whole website configuration from a JSON file.
What a Framer export brings to Amazon S3
A Framer export is a folder of rendered pages, JavaScript modules, Framer Motion bundles, fonts and images. S3 serves them as objects. The one thing to confirm is the content type of the .mjs files, since a browser will refuse a module script with the wrong type. The CLI guesses types from extensions, so check the response header on one module after the first sync.
Framer sites have few pages, which makes routing rules a good fit for redirects. A site with a dozen renamed pages stays far below the 50 rule limit, and the rules live in one JSON file that you apply with a single command.
Create the bucket and sync the folder
- Create a bucket and turn on static website hosting with index.html as the index document and 404.html as the error document.
- Turn off Block Public Access for that bucket and attach a bucket policy that allows s3:GetObject for everyone.
- Upload the folder with the AWS CLI, using --delete so removed pages disappear from the bucket.
- Put CloudFront in front of the website endpoint for HTTPS and your own domain.
aws s3 sync ./exported-site s3://my-bucket --deleteRedirects, headers and 404s on Amazon S3
The S3 website endpoint is HTTP only and has no header configuration, so security headers and HTTPS come from CloudFront. An S3 error document covers 4XX responses, and routing rules are limited to 50 per website configuration. For single pages you can set the x-amz-website-redirect-location metadata on an object, and the website endpoint answers it with a 301. Index documents work at every folder level on the website endpoint, but not through the REST endpoint.
Save this as website.json and apply it with aws s3api put-bucket-website --bucket my-bucket --website-configuration file://website.json. It sets the index and error documents and redirects one renamed section with a prefix rule.
{
"IndexDocument": { "Suffix": "index.html" },
"ErrorDocument": { "Key": "404.html" },
"RoutingRules": [
{
"Condition": { "KeyPrefixEquals": "work/" },
"Redirect": { "ReplaceKeyPrefixWith": "projects/", "HttpRedirectCode": "301" }
}
]
}A rule can use ReplaceKeyPrefixWith or ReplaceKeyWith, not both. Prefix matching is literal, so a work/ rule also catches any other key that starts with work/. Without a 404.html object, the error document setting has nothing to serve.
Framer output that needs fixing on Amazon S3
| In the Framer output | What to do on any static host |
|---|---|
| Script modules from framerusercontent.com | Framer pages hydrate with JavaScript modules. Open the network tab and confirm no request still goes to framerusercontent.com. |
| Animation that starts on load | A missing script path can leave elements hidden or unanimated. Compare the first screen against the live site. |
| Forms that submit to Framer | Forms built with Framer’s own components post to a Framer service. Switch them to a form endpoint you control. |
| Redirects set in Framer settings | They live in Framer, not in the files. Rebuild them in the host’s own redirect format before the domain moves. |
Search the network tab for framerusercontent and fix any path the export missed. Rebuild the redirects you set in Framer as routing rules, one for each renamed section. Replace Framer form components with an endpoint you control, and check the first screen for hidden elements that signal a module that did not load.
Forms and dynamic features
S3 serves files and nothing else. Use a form service, or send the form to an API Gateway endpoint backed by a function you write.
S3 cannot process a form. Use a form service or an API Gateway route in front of a function, and keep the endpoint address in the form action.
What can go wrong
- A module script served with the wrong content type is blocked by the browser, and the page stays half drawn.
- A prefix rule can match more keys than you intended. Test it with a real URL.
- Forgetting that the website endpoint is HTTP only leads to mixed content errors behind CloudFront. Use the endpoint as an HTTP origin and let CloudFront serve HTTPS.
Frequently asked questions
How do I redirect a renamed Framer page on S3?
Add a routing rule with KeyPrefixEquals for the old path and ReplaceKeyPrefixWith for the new one, with HttpRedirectCode 301, then apply it with aws s3api put-bucket-website.
How many routing rules can an S3 bucket have?
The S3 docs list a limit of 50 routing rules per website configuration. Use per-object redirects beyond that.
Why does my Framer page load half way on S3?
Check the network tab for a script returning 403 or 404, or served with a wrong content type. Fix the missing file or re-upload it with the right type.
Can I use CloudFront with a private bucket for this?
Origin access control works with the S3 REST endpoint, which does not serve index documents in subfolders. The simpler route for a static export is the public website endpoint as the origin.
Official documentation
Free tools for this job
- Framer Site AnalyzerAnalyze fonts, colors, assets, and page structure of any Framer-published site.
- Framer Site Speed TesterRun performance checks on any Framer-published URL with actionable insights.
- Static Hosting PickerAnswer 5 questions and get the best hosting recommendation for your exported site.
- Static Site Hosting Cost CalculatorCompare hosting costs: Webflow vs Vercel vs Netlify vs Cloudflare Pages at scale.
Get the Framer files first
Paste your public Framer URL into the export form and download a ZIP you can deploy to Amazon S3. The Free plan covers 1 site, 5 exports a month, 15 pages and 20 MB per export. Professional is a $9.99 one-time purchase with unlimited pages.