Work

Case study

Putting a public site on a delivery path we own

Move a public marketing site off a page-builder stack onto static delivery the team can version, review, and cache deliberately.

AWSCloudFrontStatic delivery
01

My contribution

I own this migration and the delivery path behind it: the Astro rebuild, the S3 origins, and the CloudFront distribution in front of them.

02

Reasoning

A page builder makes the first page cheap and the hundredth page expensive. Prerendered output in version control gave us review and rollback; CloudFront let the origin stay private while routing and caching happened at the edge.

03

Outcome

The site ships as prerendered files from private S3 origins behind CloudFront, with URI rewriting at the edge and cache and CORS rules written deliberately rather than inherited from plugins.

Lessons I carry forward

  • Own the delivery path, not only the pages
  • Keep the origin private by default
  • Cache rules are part of the product

The problem

The public site began in WordPress with Elementor, which is an easy way to start and a progressively harder thing to keep. A page’s structure lived inside a builder rather than in a file someone could read. Plugins accumulated behaviour nobody had chosen. There was no reliable way to see the difference between what was live yesterday and what is live today.

The goal was not to make the site faster. It was to move it onto a path where a change is a diff, a release is a deploy, and a rollback is a previous artifact.

Why it was difficult

A public site is not empty when you start. It has existing pages, existing addresses that must not break, and traffic that does not pause during a migration. Directory indexes, trailing slashes, and legacy paths stop being framework details and become real problems once pages are files in a bucket instead of routes handled by a server.

There was also a boundary the page builder had been hiding. Once files live in object storage, who is allowed to read this bucket becomes a question you have to answer on purpose.

My contribution within the team

I rebuilt the site in Astro and set up the delivery path around it: the buckets, the distribution, the edge routing behaviour, and the cache and CORS rules. Teammates owned content, design, and the decisions about what each page should say.

The key decision

Prerendered files behind a CDN, with the origin private.

Static output made review possible: every page becomes a file in version control, so a change can be read, discussed, and reverted like any other code. Putting CloudFront in front of S3 then solved three problems at once.

Origin privacy. The buckets are not public. CloudFront reaches them through an origin identity — Origin Access Control on buckets created since it became the recommended mechanism, Origin Access Identity on the older ones that predate it. Both keep the bucket policy scoped to the distribution rather than to the internet. Carrying two mechanisms is the honest cost of migrating a live estate instead of rebuilding it.

Routing at the edge. Object storage has no concept of a directory index or a clean address. Rewriting the request URI at the edge — appending the index document, normalizing trailing slashes, mapping paths inherited from the old site — keeps those rules in one reviewable place instead of scattering them across redirect plugins.

Caching we chose. Long-lived caching for fingerprinted assets, short caching for pages, and explicit invalidation on deploy. The previous stack had cache behaviour too; the difference is that this one is written down.

Trade-offs

Keep the builder and put a CDN in front of it. The cheapest change, and it would have improved response times immediately. But it leaves the actual problem untouched: pages that exist only inside a builder’s database. Caching a system you cannot review buys speed instead of control, and control was the thing we were short of.

Server-rendered site on a container platform. More flexible, and dynamic pages would have been trivial. It also means a runtime to patch, scale, and wake someone up about, for a site whose content changes a few times a week. For this workload a runtime is a liability rather than a capability.

Public S3 website endpoint as the origin. The simplest possible setup, and the website endpoint provides directory indexes for free. It also means the bucket is readable by anyone who learns its name. That is not worth the small amount of edge logic it saves.

Outcome

The site ships as prerendered files from private buckets behind CloudFront. A change is a reviewed diff, a release is a build plus a sync plus an invalidation, and a rollback is a previous artifact. Routing and cache behaviour live in code someone can read instead of in plugin settings nobody remembers choosing.

What changed in my approach

This work sits at the opposite end of my range from canvas rendering. I had spent years on the part of the stack a person touches directly, and this was a reminder that the product also includes how bytes reach a browser, who is allowed to read the origin, and whether the team can undo yesterday.

The reasoning turned out to be the same one I apply to conversion boundaries: decide what crosses, make it explicit, and never let a tool’s default quietly become an architecture nobody chose.