Real-world serverless — Building my holy grail (part 1)

Arto Liukkonen
Nordcloud Engineering
3 min readJun 4, 2020
Illustrations by Eija Jokilahti

I started my serverless journey over four years ago, and looking at commit logs it’s almost exactly four years since the first commit in my first serverless customer project. I started with the Serverless Framework & AWS, and these are still my #1 tool. Serverless Framework got a major upgrade from 0.X to 1.X in late ’16 but after that, there haven’t been any major changes. Of course, both SLS and AWS have received tons of new features, but the core functionality has stayed the same.

During my serverless journey, I’ve used my own, fellow nordcloudian’s, and also some open-source boilerplates. This spring I noticed that my boilerplate had outdated, and I ended up choosing random templates whenever I started a new project. I found many new good practices & tools and basically started a quest for my “serverless holy grail”.

Why yet another boilerplate?

I think that having a well-crafted boilerplate and knowing it’s best practices is a must-have when starting new projects basically every month. Solving problems with the development environment, setting up CI/CD, and doing other non-productive functions should be a one-time job.

Requirements of course change and new tools come up all the time. At least for me, boilerplate is also a way to focus on the most important things; it’s not always necessary to learn and start using all the latest tools. If there really is some big new thing or requirement, I can, of course, add it as a part of my solution.

Requirements

As TypeScript is gaining momentum, I also chose to jump on that train. I feel much more comfortable shipping code to production, as I can be (almost) sure that the typings are correct.

The second thing was the monorepo approach. Instead of having boilerplate for a simple single serverless project, I often ended up in a situation where I needed to split my stack into multiple parts. Also when doing personal projects or projects where I’m the only developer, it’s convenient to have also the frontend codes in the same repository.

The third thing I wanted to solve is the unified approach for CI/CD pipeline. Too many times I found myself struggling to set up the pipeline with various tools.

My Serverless tools 2020

  • Serverless Framework
  • TypeScript
  • Lerna
  • Yarn Workspaces (switch to NPM7 once it’s released)
  • CircleCI or Github Actions or AWS Cloud* tools
  • Webpack or Parcel
  • sls-dev-tools (maybe, is suitable for monorepo?)

As you can see there are still a few things that are left to be decided on what would be my #1 option for the boilerplate. The dream would be to be able to use this both on personal projects but also on customer projects that I do at Nordcloud.

Do you have any suggestions/experiences around these tools? Or is there some cool tool that I’m missing? As far as I’ve found, this repository by erezrokah is very close to what I’m trying to achieve.

The next part of this blog post is coming in June and by that date, I expect to have boilerplate published on my Github. Thank you if you got this far reading, and welcome to my journey to build the best possible serverless boilerplate.

--

--