Services and deployment

A service is a project where we define the functions, the events that trigger them, and any infrastructure resources that are required for the function to perform. They are collected together into one file, which is called serverless.yml

eg.  myServerlessService/        serverless.yml

When we start using Serverless Framework for deployment, we will be using one single service. But as the application grows, it is recommended that you have multiple services as shown in the following code: 

 users/        serverless.yml # Contains 4 functions   posts/         serverless.yml # Contains 4 functions

Having multiple services can isolate the infrastructure resources that are to be used. But it also has a drawback, as currently each service creates ...

Get DevOps for Serverless Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.