Skip to main content

Free Docusaurus in AWS

Let's start with something simple. Would you like to have a personal website like mine? This article explains how to build it and host it for free.

Tools used

Blog software

  • Docusaurus: A static site generator that builds optimized websites quickly.

Authoring blog content

  • Visual Studio Code: A code editor for writing and editing markdown and code.
  • GitHub Copilot: An AI pair programmer that helps you write code and blog articles faster.
  • ChatGPT DALL-E 3: An AI model that generates images from textual descriptions.
  • draw.io: A free online diagramming tool to create flowcharts, network diagrams, and more.

Hosting

Deployment

  • GitHub: Hosts the source code and manages version control.
  • GitHub Actions: Automates workflows for building, testing, and deploying your Docusaurus site.
  • Terraform: An infrastructure as code tool that allows to define hosting infrastructure in a declarative way. TODO: add terraform; I will be fair, for the time being I've used ClickOps approach

Diagram

Blog Diagram

info

This is of course not the simplest way to have a blog. If you are not interested to play with all that technologies, you can just pick one of the ready-to-go blogging platforms.

Costs

  • 20$ per 2 years for pawelmantur.pl domain. It is also possible to buy domains directly via AWS Route 53, but they do not have .pl domain. I was checking also other places like Polish home.pl where I've used to buy domains in the past, but GoDaddy had better offer
  • 10$/month for GitHub Copilot Pro. Yoy may also consider a free plan
  • 20$/month for ChatGPT Plus that provides access do DELL-E image generation. I plan to unsubscribe after 1st month, after generating some images to enhance my existing blog content, and get back again to the subscription when needed
  • AWS free tier for S3 and CloudFront
  • AWS public SSL certificates are free
  • 0.50$/month for Route 53 hosted zone - place for optimization, I could manage DNS records in GoDaddy
  • GitHub Actions free tier (up to 2000 minutes monthly), I am not building and deploying on every commit but only after merging a PR to main branch, to not use free minutes too quickly

As we can see, besides domain costs, such blog can be run for free. I am using paid AI tools, but this is optional. All other things, at least with my modest scale, are free.

tip

CloudFront and S3 provide autogenerated domains, so purchasing your own custom domain is optional. I would recommend to first create some content that you'd like to promote and share, before buying your "branded" domain.

Source Code

I am using a private GitHub repository, so that copying my blog is at least a little bit less trivial ;) But if you'd like to get access to the code, reach out on LinkedIn. I can share the source code.

References