DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Cover image for Learn Serverless Framework
James Miller
James Miller

Posted on • Originally published at jamesmiller.blog on

Learn Serverless Framework

I spent some time awhile ago to play with and learn Serverless Framework, it has been super helpful in the process of creating back end APIs – I almost can’t imagine writing lambda functions without it!

This short post will explain what Serverless Framework is, how it can be used, why it is great and how you can learn to use it!

What is Serverless Framework

Serverless (SLS) Framework is a Infrastructure as Code (IaC) framework, that focusses on defining serverless resources through the use of yaml and json files.

How it works

What separates SLS Framework from other IaC frameworks like Terraform, is that it is focusses on back end developers, rather than devops engineers.

When you write a SLS Framework configuration file, it is super quick to configure orchestration lambdas that you want to deploy to an API Gateway.

This allows Back End Developers to focus writing the actual business logic of the back end apis rather than the configuration of the infrastructure.

It is possible for SLS Framework to be used to also configure the cloud infrastructure too if needed, as it is built on top each cloud providers’ IaC framework (for AWS this is CloudFormation, for Azure it is Azure Resource Manager and for GCP it is Cloud Deployment Manager).

Why should you learn serverless framework

Serverless Framework provides developers who don’t traditionally focus on devops with an opportunity – to gain experience in developing their devops skills and bridge the gap between developers and more β€˜ops’ focussed devops engineers.

Even if a developer is not interested in developing their devops capability, Serverless Framework is great to use regardless, as it allows developers to document their backend api endpoints and lambda functions in a git repo – making it easier to keep track of backend logic.

A big selling point for Serverless Framework, is that it is super easy to spin up a local development environment to test your back end logic. This means you don’t have to constantly redeploy your serverless framework code in development, you can just work iteratively locally (e.g on localhost:4000) and every time you save it will refresh your local development server.

Lastly, Serverless Framework is super flexible on what languages you can use to write you backend logic!! That means it doesn’t matter if you like to write your lambda functions in python, nodejs, rust, go – nothing can hold you back πŸ˜€

Where to start

  1. Install Serverless Framework on your computer
  2. Set up AWS access with IAM
  3. Deploy your first lambda

GO BEYOND – Useful links to explore!

Serverless Framework is a great tool to use by itself, it is however made even more powerful when combined with other technologies as part of a greater devops process!

I hope this post helps you understand how best to learn Serverless Framework, have fun creating your APIs πŸ˜€

Top comments (0)

12 Gorgeous UI Components for Your Design Inspiration

12 Gorgeous UI components for your design inspiration: cards, text, buttons, checkboxes, icons, loaders and menus.