December 2019
Intermediate to advanced
382 pages
9h 43m
English
Another thing that is great about the Serverless Framework is that you don't have to leave your Terminal that often to find out what's going on. Whether it's creating, testing, or deploying—there's a command for that and you can do it all inside the Terminal. The same goes for trawling the logs or checking your function error rates.
With the serverless logs command, you can go back and see historical logs from CloudWatch logs. You can also subscribe to the log stream, which polls continuously in the background to keep your feed up to date. My favorite command to run after deploying a stack for a serverless API is one that tails the logs. Use the following command to do so:
sls logs --function hello --stage dev --startTime ...