To host a Next.js site on Amazon S3 and CloudFront, first confirm it works as a static export: the pages and assets must be generated at build time, without request-time server features. Configure Next.js with output: 'export', build the project, and publish the generated out directory to S3 behind CloudFront. That can be inexpensive, but “for pennies” is not a guaranteed bill. AWS lists a CloudFront Free flat-rate plan at $0 per month with usage allowances; your architecture, traffic, region and other services still affect the cost.
The practical question is: how do I host a Next.js static site on S3 and CloudFront, and what will it cost? The steps below cover the eligibility check, deployment shape, security choice and managed alternative.
As an Amazon Associate I earn from qualifying purchases.
Check whether your Next.js app can be exported as static files
Static export works when the site can be represented by files produced during a build. Next.js documents static exports as suitable for web servers that serve HTML, CSS and JavaScript, including Amazon S3. Its current configuration is output: 'export'; running next build creates the deployable files in an out directory. Next.js 14 removed the older next export command. See the Next.js static export documentation.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Before changing deployment platforms, check every feature your app uses against the framework’s export limitations. Static storage cannot run server code or make pages dynamic at request time. Next.js lists API routes, rewrites, redirects, headers, middleware, ISR, Draft Mode, default image optimization and getServerSideProps among the features not supported in a static export. Dynamic routes that depend on fallback modes are also restricted. Consult the Next.js feature limitations and determine whether any unsupported behavior can be removed, moved to a separate service or replaced.
#1 Best Overall
- Static export is a fit: pages and assets can be generated at build time, and the site does not rely on unsupported request-time behavior.
- Static export is not a drop-in replacement: the app needs server rendering, API routes or other unsupported features at runtime. Use a server-capable platform or redesign those parts before deploying to S3.
Build and deploy the static output
For an eligible app, the deployment sequence is straightforward. AWS documents S3 with CloudFront and origin access control as a secure static-site pattern, but your domain, routing, error handling and cache settings still need to match the site.
- Check compatibility. Review the app’s routes and features against the Next.js static export limitations before relying on a static deployment.
- Enable export. Add
output: 'export'tonext.config.js, following the current Next.js configuration guidance. - Build for production. Run
next build. Next.js generates the static site inout, including route HTML and static assets. - Publish the generated files. Upload the contents of
outto an S3 bucket. Plan how changes will be deployed repeatedly rather than treating the initial upload as the whole deployment process. - Put CloudFront in front of the bucket. Configure CloudFront to serve the S3 origin. For a private origin, follow AWS’s secure static website pattern using origin access control.
- Verify the live site. Test the home page, nested routes, assets and error behavior through the CloudFront URL or domain. Check that updated files appear as expected under your chosen caching configuration.
- Automate release and cache handling. Choose a repeatable upload or build deployment process and decide how CloudFront’s cached copies will be refreshed when files change.
Static hosting serves generated files; it does not make a Next.js app’s server-dependent routes work. Also, cache policy and invalidation details depend on your deployment, so do not assume that uploading a new build alone guarantees every visitor immediately receives every changed object.
Rank #2
Keep the S3 origin private where appropriate
An S3 website endpoint configured for public access and a private S3 bucket served through CloudFront are different architectures. In AWS’s secure pattern, CloudFront uses origin access control to retrieve objects from the bucket, so visitors use CloudFront rather than accessing the bucket directly. AWS explains this approach in its secure static website guide. Do not make a bucket public by default just to serve a site; choose the access model deliberately and follow the AWS configuration for that architecture.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Choose between direct S3 and CloudFront or Amplify Hosting
Direct S3 and CloudFront gives you control over the storage and delivery architecture, but you configure and maintain more of the pieces yourself. AWS recommends Amplify Hosting for static website content stored in S3. Amplify is a managed hosting option with CloudFront-backed delivery, HTTPS, custom domains, monitoring, password protection, and redirects and rewrites, billed under Amplify’s pricing model. See AWS guidance for hosting S3 website content with Amplify.
Rank #3
| Consideration | S3 and CloudFront directly | Amplify Hosting |
|---|---|---|
| Static versus SSR | Suitable for static output; S3 does not run Next.js server code. | Static hosting is available; AWS documents Next.js SSR support through Next.js 15, including features such as image optimization and middleware. Check current version and feature support in AWS’s support documentation. |
| Infrastructure setup | You configure the bucket, CloudFront distribution, access, routing and cache behavior. | Managed hosting handles more of the hosting workflow and includes documented features such as HTTPS, custom domains and monitoring. |
| Deployments | You arrange how build output is uploaded and how cached content is refreshed. | Offers a managed deployment path. If the site is deployed from S3, changes to S3 objects are not automatically detected; AWS says a redeployment is required for those changes to take effect. See the S3-to-Amplify update procedure. |
| Routing and redirects | You configure the behavior needed for the site’s routes and errors. | AWS lists redirects and rewrites among Amplify Hosting features. |
| Cost model | Depends on the selected CloudFront pricing arrangement and the usage and services in your architecture. | Uses Amplify’s pricing model; check current pricing against your expected usage. |
| Availability and feature fit | Check the AWS service and feature availability for your chosen region and architecture. | Check Amplify’s current regional availability and whether its documented Next.js support covers the framework version and features you need. |
If you need Next.js server-side rendering rather than static output, Amplify may be a better fit than static S3 hosting: AWS documents Amplify Hosting support through Next.js 15, including SSR. That is a version- and feature-specific statement, not a guarantee that every future Next.js release or feature is supported. Check the current Amplify Next.js support documentation before choosing.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.What “for pennies” can—and cannot—mean
As listed on AWS’s current pricing page checked October 5, 2026, the CloudFront Free flat-rate plan costs $0 per month and includes 1 million requests, 100 GB of data transfer per month, and 5 GB of S3 storage. AWS announced the flat-rate plans on November 18, 2025. The live terms are on CloudFront pricing; the announcement date is documented in AWS’s plan announcement.
Rank #4
These are plan usage allowances, not a prediction that every site’s total AWS bill will be zero or only a few cents. AWS says usage can be monitored in the CloudFront console; see its flat-rate plan documentation. The CloudFront allowance does not establish whether a particular setup’s S3 use, domain registration, deployment pipeline, logs or other selected services will cost extra.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11- Estimate expected monthly requests and data transfer rather than assuming your site will stay within plan allowances.
- Check the current CloudFront plan terms and AWS pricing for the region and architecture you intend to use.
- Account separately for services and costs not established by the CloudFront allowance, including your domain and any chosen deployment or logging services.
- Compare the relevant Amplify charges if you prefer managed hosting; its billing follows Amplify’s pricing model.
Because traffic, region, object size, domain and deployment choices vary, there is no reliable universal monthly total for “a Next.js site on S3 and CloudFront.” Use the live pricing pages or AWS calculator for your own configuration.
Quick Recap
Best Value
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




