Skip to Content
Learn AWS Serverless Computing
book

Learn AWS Serverless Computing

by Scott Patterson
December 2019
Intermediate to advanced
382 pages
9h 43m
English
Packt Publishing
Content preview from Learn AWS Serverless Computing

Logging and monitoring

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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Amazon EC2, SQS, Kinesis, and S3: A Hands-On Approach to AWS

Practical Amazon EC2, SQS, Kinesis, and S3: A Hands-On Approach to AWS

Sunil Gulabani

Publisher Resources

ISBN: 9781789958355