Lambda logging
Our code for the postHandler Lambda function includes a call to the console.log function to log the value of the event.body parameter. If this were a standard Node console application, we would be able to simply monitor the command line to see the results of this call to console.log. Unfortunately, as this code is an AWS Lambda function, we will need to find another way to access the logs that are produced when we execute this function. As always, the AWS web-based GUI provides a mechanism to view these logs, but it is fairly time-consuming to find and constantly refresh the web-page to see the latest results. Fortunately, Serverless provides a simple command-line interface that uses the AWS API to monitor the console logs ...
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.
Read now
Unlock full access