This site is a static Astro site served from Amazon S3 and CloudFront at ineedmoreinformation.com. Every push to master is checked, built and deployed by GitHub Actions in under a minute, without any stored AWS credentials. It started as a Jekyll site on GitHub Pages; this blog post covers how and why it moved.
Tech Stack
| Layer | Technology |
|---|---|
| Site | Astro 7 (static output), TypeScript 6 |
| Content | Markdown and YAML in content collections, with front matter validated by Zod schemas |
| Styling | Tailwind CSS 4, self-hosted Roboto, Font Awesome icons rendered to inline SVG at build time |
| Markdown | Astro’s Sätteri processor, Shiki syntax highlighting with light and dark themes |
| Hosting | Amazon S3 (private), CloudFront, ACM, Route 53 |
| Infrastructure | AWS CDK in TypeScript |
| CI/CD | GitHub Actions, GitHub OIDC to an IAM role |
| Upkeep | Dependabot, with grouped weekly and monthly updates |
Architecture
Components
- Route 53 holds the domain’s hosted zone. The stack imports the zone instead of creating it, so deleting the stack can never delete DNS. Apex and
wwwboth have IPv4 and IPv6 alias records pointing to CloudFront. - CloudFront serves HTTPS with HTTP/2 and HTTP/3, adds AWS’s managed security headers, and uses the cheapest price class (North America and Europe edge locations). An ACM certificate covers the apex and
*.wildcard, so future demo subdomains can share it. It lives inus-east-1, as CloudFront requires. - A CloudFront Function runs on every request. It redirects
wwwto the apex, adds a trailing slash to extensionless paths, and maps/foo/to/foo/index.html, since S3 has no directory indexes. - The S3 bucket blocks all public access, enforces TLS and is encrypted at rest. Only CloudFront can read it, through Origin Access Control. CloudFront’s access doesn’t include listing the bucket, so S3 answers a missing key with 403, and CloudFront serves
404.htmlfor both 403 and 404. The bucket is kept if the stack is ever deleted. - An AWS Budget emails me at 80% of actual and 100% of forecasted monthly spend.
Request sequence
www or a path without a trailing slash get a 301 from the Function instead of a rewrite.Deployment
Site changes (automatic)
- Pull request: GitHub Actions installs dependencies with
npm ci, type-checks withastro check, builds, and runs a URL check that fails if any page from the original site is missing from the build. Nothing deploys. - Merge to
master: the same checks run, then the deploy job starts. A newer push cancels a deploy that’s still running, so only the latest commit goes out. - Sign in: the deploy job asks GitHub for an OIDC token and exchanges it with AWS STS for one-hour credentials. The IAM role only accepts tokens for this repository’s immutable owner and repo IDs on
master. A renamed repo, a fork, or a new repo reusing the name can’t assume it. - Upload:
aws s3 sync --deleteuploads the build twice. The_astro/assets have content-hashed names and get a one-year immutable cache. Everything else (HTML, feeds, the resume PDF) tells browsers to revalidate and lets CloudFront cache it for a day. - Invalidate: a CloudFront invalidation of
/*makes the new HTML live at the edge within a minute or so.
The deploy role can list, put and delete objects in the site bucket and invalidate the site distribution, and nothing else. The role ARN, bucket and distribution ID are repository secrets, so GitHub masks them in the public logs.
Infrastructure changes (manual, rare)
The infrastructure is a CDK app in infra/.
- Configure: account-specific settings live in a gitignored
infra/.env: domain, hosted zone, the repository in its immutableowner@ownerId/repo@repoIdform, deploy branch, and budget.infra/.env.examplelists them. The app checks every value before it builds a template, and rejects a plainowner/repo. - Review:
npx cdk diffshows exactly what will change. - Apply:
npx cdk deploywith an AWS profile. The stack has termination protection, and the template never contains the account ID. - First deploy only: copy the three stack outputs (bucket name, distribution ID, deploy role ARN) into the repository secrets the workflow reads.
Deploy sequence
Estimated Cost
| Item | Estimate |
|---|---|
| Route 53 hosted zone | $0.50 / month |
Domain registration (.com) |
about $15 / year (~$1.25 / month) |
| CloudFront requests, transfer and Function invocations | $0, inside the always-free tier |
| S3 storage and requests (under 2 MB stored) | a few cents |
| ACM certificate, DNS alias queries, invalidations, the budget | $0 |
| Total | about $1.75 / month |
The original GitHub Pages site cost nothing. The new cost is almost entirely the domain. Estimates use AWS list prices as of November 2026.
Highlights
- Blog posts, projects and the CV live in type-checked content collections, so bad front matter fails the build instead of breaking a page.
- Every page is static HTML. The only client-side JavaScript is the theme toggle, the mobile menu and the reading progress bar, and the site makes no third-party requests.
- The build needs only Node. The Ruby, Python and ImageMagick dependencies from the Jekyll setup are gone.
- CI checks that every URL from the old site still resolves.
- Deploys use short-lived OIDC credentials and a least-privilege role tied to immutable repository IDs. No AWS keys are stored in GitHub.
- Cache headers are split by file type, so repeat visitors re-download only what changed.