Serverless Framework — Templates

Serverless Framework templates can rapidly speed up new project development.

Serverless Guru
Serverless Guru

--

https://pixabay.com

In this article, we are going to dive into using a powerful new feature of Serverless Framework that allows us to easily create reusable patterns that we can use for future projects and share to our fellow teams or the community at large.

Prerequisites:

  • Serverless CLI
  • Background with the Serverless Framework

When it comes to starting new projects you always want to skip as many steps as possible. Specifically, if you’re working with the Serverless Framework you want to skip having to manually create a serverless.yml file and an initial lambda function.

Most people who use the Serverless Framework are fully aware that you can run a command like this.

$~: sls create --template aws-nodejs --path nodejs-project

However, did you know that the Serverless Framework has A LOT of other templates!? Let's get into it.

Well played sir:

How do you leverage a template to speed up new projects?

$~: sls create --template <template> --path <directory_name>

Python:

--

--

Serverless Guru
Serverless Guru

We can help you migrate to serverless, build serverless applications, and train your team on serverless best practices. https://www.serverlessguru.com