Jekyll on AWS

2 minute read

Simplicity

A long time ago I remember having read this post from some famous guy :-) Around that time I was trying to develop a small Django application integrated into django CMS. I used the Django CMS framework to generate a fancy menu system and publish some additional content. I also had a Wordpress site that I was maintaining for a small non-profit association. All in all, I was trying to put some interresting content on the Web but I was spending more time doing the sysadmin around all that (DNS, Web & Database Server,…) than producing content.

This article remained in my memory. If ever I start a blog one of these days it has to be that simple. No server to manage, lightweight approach.

I could have turned to ghost or medium but I still love a bit more freedom and some technical challenge ! I was happy to see that Jekyll already mentionned at the time in my reference post was still in the game. A quick look @ github to check a bit the project activity => not a single doubt anymore. Let’s give it a try.

For all what is a bit “geeky” on my Windows office laptop I use WSL2 nowadays. I followed the installation instructions for Jekyll on Ubuntu. Less than 10 min later I was reading my first “Hello Blog!” post … have you read it ?

Next step was to bring that online. Github is a good candidate for Jekyll sites but I was still decided to host on AWS. I looked into the deployment section of the documentation to find out the instructions for an Amazon S3. I was a bit sad to read that the project is not actively maintained. I am sure this is still a valid option but I continued to search for an alternative. Then I found the AWS Amplify third party deployement option. Wow! This is luxury! CD integration with AWS CodeCommit, HTTPs + certificates, simple DNS configuration and more. I followed the pretty clear step-by-step guide. There was just a small hickup related to a non satisfied Ruby version requirement. I could find quickly a solution as fully documented here by adding a command to the preBuild and build steps to switch Ruby versions as follow:

preBuild:
  commands:
    - rvm use $VERSION_RUBY_2_6
    - bundle install
build:
  commands:
    - rvm use $VERSION_RUBY_2_6
    - bundle exec jekyll b

30sec after my next commit, this blog post will now be published.

This is simplicity.

Updated: