S3 Blog

How to host a blog on AWS S3 in 30 minutes.

Hugo is “one of the most popular open-source static site generators,” that makes hosting any kind of site on AWS S3 a breeze.

This blog was created in a mere thirty minutes using the Hugo Quick Start.

Installation is fast and easy on a Mac using home-brew.

brew intall hugo

Navigate to a top level directory that you want to use for site creation and use the hugo commands to create your new site.

mkdir -p ~/Documents/HugoSites/ & cd ~/Documents/HugoSites/
hugo new site _your-sitename_
cd _your-sitename_
git init

Choose a theme from the Hugo Themes site. I decided on the Dimension theme and used the instructions there to install it.

git submodule add https://github.com/your-identity/hugo-theme-dimension.git themes/dimension

Add the theme setting to the Hugo config file:

echo 'theme = "dimension"' >> config.toml

To create this blog entry I chose to use hugo so the basic blog parameters are created for me:

hugo new posts/astaticbloginthirty.md

It should be noted that I customised the Dimension theme a little to display taxonomies and categories.

Now that I’ve got a blog site created, I want to publish this to S3. Although I could build the site and use the AWS Console to create a bucket to host etc, AWS SAM is a much faster better way to do this in a DevOps manner.