⤶ Back

Hosting This Blog

Mar 1, 2026

Full transparency: this post is more for me to remember how I even got all this set up, but if anyone finds this helpful as well for hosting their own blog, that’d make me very happy.

The Tech Stack

I based the structure of this website using a modified version of the Cloud Resume Challenge and built it using Astro. You could probably build something similar using 11ty or Hugo, but I wanted the option to inject JavaScript later for fun. The site’s build is being hosted on an AWS S3 bucket, using CloudFront as my CDN, and a purchased Porkbun domain handling my DNS records. CI/CD is managed by GitHub and GitHub Actions, automatically running my pipeline when new code is pushed to the repo and deploying it to my S3 bucket. This is a very simple stack, but it works seamlessly for making changes to your site and delivering it to your audience. You can defintely zhuzh it up with more features (I’ll get to my plans for that later on) but it gets the job done.

A Quick Step-by-Step Procedure

  1. First, create a private S3 bucket to upload your site’s dist folder. You can generate it using npm run build. Make sure you upload the contents of the folder to the bucket’s objects, not the folder itself.
  2. Then, you create your CloudFront distribution to act as your CDN (content delivery network) for the contents of your S3 bucket. Configure the distribution to have your bucket’s domain as the origin domain, with origin access as OAC, then apply the generated policy statement to your S3 bucket policy.
  3. In order to access your site’s subfolders, you need to add a CloudFront function to your distribution. I used this function from bachi.biz for this, allowing for my blog posts to actually be served.
  4. Now that you have a working CloudFront distribution serving your content to the web, you can set up a custom domain. I purchased my domain from Porkbun, which comes with a free SSL/TLS certificate through Let’s Encrypt, which allows for secure HTTPS access to your site (and eliminating that pesky certificate warning). Once you purchase your domain, import the free certificate into AWS ACM, then associate it with your CloudFront distribution.
  5. Then, in Porkbun, under your domain’s DNS tab, create a new CNAME record with the url and subdomain of your choosing (in my case, “blog.usefulsplash.dev”) as the “host”, and the original CloudFront distribution url as the “answer”.
  6. Assuming your site’s code is being hosted on GitHub, you can now use GitHub Actions to manage continuous delivery when changes are made to the repo. Create a new IAM role for GitHub Actions, then set up OIDC (OpenID Connect) to securely deploy to AWS. OIDC allows for short-lived access tokens directly from AWS rather than using hardcoded secrets. This IAM user should have two policies: “oidcsafety” which prevents GitHub Actions from assuming any other role, and the Astro template policy for pushing changes to our site and rebuilding the dist contents.
  7. Now within your GitHub repository’s settings, you can add your “AWS_ROLE_ID”, “BUCKET_ID”, and “DISTRIBUTION_ID” to the Actions secrets and variables tab to connect the repo to both your new IAM role and your CloudFront distribution.
  8. Finally, using the main.yml template from the Astro docs, add your new workflow to your repo’s Actions tab. E voila, you have your own website with CI/CD.

My Next Steps

In the ever-ongoing road to learning more and more tools of the trade, I’m hoping to overengine- ahem, improve, the infrastructure of my site to have more familiarity with these technologies I use at work. I’m tinkering with the idea of a guestbook where users can leave messages, which would involve DynamoDB to handle that kind of user input, as well as API Gateway and Lambda to communicate with that database. Added functionality also brings on the challenge of testing code for my Lambda functions, so Python testing is certainly in my future. And of course, if you’ve been in the industry for any amount of time, the push for containerization and infrastructure-as-code is alive and well, so containerizing the site in Docker and using Terraform for my IaC is the ultimate goal for this baby. Dear reader, I hope this at the very least gives you some inspiration for making your own lil’ corner of the internet, and if you have any questions feel free to get in touch with me! I’ll leave all the references I used below.

References

© 2026

Email GitHub LinkedIn