2 min read
sergiobelli.net

This site itself is a working example of a modern, fully automated static site deployment on AWS.

Stack

LayerTechnology
FrameworkAstro Nano (static site generator)
HostingAWS S3 (eu-south-1) + CloudFront
SSLAWS ACM (us-east-1)
DNSAWS Route 53
CI/CDGitLab → Buildkite → EC2 agent
IaCAWS CloudFormation

Architecture

Content is written in Markdown and built by Astro into a fully static site. On every push to main, a Buildkite pipeline running on a personal EC2 agent:

  1. Installs dependencies (npm ci)
  2. Builds the static site (npm run build)
  3. Syncs the dist/ folder to S3 (aws s3 sync --delete)
  4. Invalidates the CloudFront cache

The S3 bucket is fully private — access is granted exclusively to CloudFront via Origin Access Control (OAC). Infrastructure was provisioned entirely with a single CloudFormation stack (S3 + CloudFront + OAC + IAM policy + Route 53 records).

Key decisions

  • Astro over Hugo or Next.js — markdown-based, Lighthouse 100/100 out of the box, zero JavaScript shipped to the browser
  • Buildkite over GitHub Actions — reuses existing personal CI/CD infrastructure already running for other projects
  • CloudFormation over manual setup — full infrastructure reproducibility in a single YAML file
  • S3 + CloudFront over Vercel/Netlify — full control, near-zero cost (~$0.50/month), no vendor lock-in

Cost

Estimated monthly cost: < $1 (S3 storage + CloudFront requests at low traffic volume).