The five Serverless Framework commands that you should be using

Serverless Guru
Serverless Guru
Published in
5 min readAug 12, 2019

--

When it comes to the Serverless Framework, there can be quite the learning curve. However, with a few helpful commands, you can streamline your Serverless development and keep your focus on building versus debugging.

The purpose of this article is to show a series of commands which we constantly use at Serverless Guru to speed up debugging and provide results faster to our clients.

Commands

In the following section, we will show the commands and give some brief insight into how we use them at Serverless Guru.

Packaging

When it comes to packaging your AWS Lambda functions you will be tempted to simply run the sls deploy command which will zip up your lambda file, node_modules, and any other files which you’ve told the Serverless Framework to include. However, running sls deploy also begins the deployment to AWS and if we simply want to inspect the size and the contents of the zip file we can run the following command:

$: sls package -v

Note: You can still pass flags (e.g. --stage <> or --region <> ) if you have these flags defined in your serverless.yml file.

If you are interested in achieving even smaller package sizes, we frequently use the…

--

--

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