Why we host our website on AWS Amplify

How we host our own Next.js site on AWS Amplify, what it costs, the alternatives we weighed, and the lesson from a build that failed without anyone being told.

Westerwick4 min read

Scaffolding rising up the side of a building against a clear sky, seen from below
Photo: Niklas Hamann on Unsplash (Unsplash License)
On this page

A company that builds AI systems on AWS should be able to explain, plainly, how it runs its own website. Ours runs on AWS Amplify Hosting. Here is why we chose it, what it costs, what we weighed it against, and one lesson we learned the hard way.

What Amplify Hosting does

Amplify Hosting takes a website's code from a Git repository and publishes it. AWS describes it as "a Git-based workflow for hosting full-stack serverless web applications with continuous deployment" that deploys the site to "the AWS global content delivery network (CDN)"1. A content delivery network serves pages from locations close to each visitor.

In practice, when we push a change to our main branch, Amplify builds the site and publishes it without anyone touching a server. Our site is built with Next.js, a popular web framework, and some pages and features run code on the server rather than just serving files. Amplify runs that part for us too. AWS says it "fully manages server-side rendering (SSR)" for Next.js2.

Why it fits our setup

The main reason is consolidation. The website isn't a standalone brochure. It sits next to:

  • our Westerwick AI chat, which runs on Amazon Bedrock;
  • a sign-in for our own team, built on Amazon Cognito;
  • a contact form that sends email through Amazon SES.

All of it runs in a dedicated production AWS account, separate from the account that manages our organisation, as we explain in why the management account should not run workloads. One provider, one bill, one set of access controls and one audit trail.

It also means we run on our own website the same practices we recommend to clients. Every change is reviewed in Git, and deployment is automatic.

The lesson: a failed build fails quietly

Amplify uses what AWS calls atomic deployments: the site "is updated only after the entire deployment finishes"1. That's good for visitors. They never see a half-published site.

The flip side caught us out. A new batch of articles was pushed, the build failed on an unrelated technical error, and Amplify did what it is designed to do: it kept serving the previous version. Nothing was broken, so nothing looked wrong. The new articles just weren't there, and nobody was alerted until we checked. Re-running the build fixed it.

Amplify can send email notifications "when a build succeeds or fails"3, but you have to set them up. Our practice now is to confirm every build after a push, and we recommend switching on build notifications on day one.

Atomic deployments protect your visitors from a broken build. They don't protect you from not knowing about it.

What it costs

Amplify is priced by use, in US dollars. At current list prices, builds cost USD 0.01 per build minute and serving pages costs USD 0.15 per GB after the first 15 GB each month4. Server-rendered requests cost USD 0.30 per million after the first 500,000 a month4.

AWS's own examples give a sense of scale. A small team's site with 300 daily visitors comes to USD 8.08 a month. A site with 10,000 daily visitors comes to USD 65.98 a month, almost all of it for data served4. For a South African business the Rand cost moves with the exchange rate, so set a budget alert.

The alternatives we weighed

Amazon S3 with CloudFront. A storage bucket behind AWS's CDN is a cheap, solid way to host a purely static site. But on an S3 website, pages are static content only5. It can't run the server-side parts of a Next.js site. AWS itself says "We recommend that you use AWS Amplify Hosting to host static website content stored on S3"5.

Vercel. Next.js is "maintained by Vercel"6, and Vercel is a strong, zero-configuration home for it. If we didn't already run everything else on AWS, it would be a very reasonable choice.

Feature fit. Amplify doesn't support everything in Next.js. Its documentation lists "Next.js streaming" and edge middleware among unsupported features, and names managed support for Next.js versions 12 through 152. We run a newer Next.js version, and it has worked for us. But anyone choosing a host should check Amplify's documented support against the features their site actually uses.

Does this work for a South African business?

Yes, with two things to know.

Your domain and email can stay where they are. Amplify supports custom domains managed by "a third-party DNS provider"7. We keep our domain's DNS and our email with our existing South African host and simply point the website at Amplify.

The app runs in an overseas Region. Our Amplify app runs in AWS's US East Region, while visitors are served through the global CDN1. For a marketing site that's fine. If your site collects personal information, where it's processed is a question for your POPIA review, and worth professional advice.

What to do next

  1. Decide whether your site is static or server-rendered. A static site has cheaper, simpler options.
  2. If it's Next.js, compare hosts on the features you actually use, checking Amplify's supported and unsupported feature list.
  3. Connect a test branch first and confirm it builds and deploys before moving your main site.
  4. Turn on build notifications so a failed build can't go unnoticed.
  5. Host it in a workload account, not your AWS management account, with a budget alert set.

Sources

  1. 1.Welcome to AWS Amplify HostingAWS Amplify Hosting User Guide
  2. 2.Amplify support for Next.jsAWS Amplify Hosting User Guide
  3. 3.Setting up email notifications for buildsAWS Amplify Hosting User Guide
  4. 4.AWS Amplify pricingAmazon Web Services
  5. 5.Hosting a static website using Amazon S3Amazon S3 User Guide
  6. 6.Next.js on VercelVercel
  7. 7.Connecting a custom domainAWS Amplify Hosting User Guide

See it on your own data first.

We stand up a working proof of concept on our AWS account. Real sample data, no cost to you, before you commit to a build.