All Writing
·
Cloud & InfrastructureWeb Development
Moving jamesrenaud.ca from WordPress to Astro, S3 & CloudFront with OpenTofu
For years, jamesrenaud.ca ran on a managed WordPress instance in AWS Lightsail. While WordPress gets you up and running quickly, maintaining a database and PHP runtime just to serve articles, project writeups, and a resume adds unnecessary overhead.
The New Architecture
I wanted a fast, zero-maintenance setup where:
- All content lives in Git as Markdown — easy to edit, version-controlled, and portable.
- Pages are statically generated using Astro and styled with Tailwind CSS.
- Hosting is serverless on AWS — private S3 bucket with Origin Access Control (OAC) behind a global CloudFront CDN distribution.
- 100% Infrastructure-as-Code — managed declaratively with OpenTofu and remote state in S3.
resource "aws_cloudfront_origin_access_control" "site" {
name = "jamesrenaud-ca-oac"
origin_access_control_origin_type = "s3"
signing_behavior = "always"
signing_protocol = "sigv4"
}
Stay tuned as I continue adding side-projects and new technical write-ups!