Lambda, APIG and Cloudwatch

I’ve created a simple app logging service.

module.exports.handler = function(event, context, callback) {

  console.log(event.body);

  const response = {
    statusCode: 200
  };

  callback(null, response);
};

Rather than using the lamda’s self logging, I want to log to another permanent log stream, given that when we deploy a lambda with serverless it effectively recreates it and generates a new log instance and thus stream.

How do I disable the lambda’s self logging with serverless?

1 Like