Home > Software engineering >  AWS Lambda: Turn off logging for certain requests
AWS Lambda: Turn off logging for certain requests

Time:10-12

I have a lambda function an and a event to keep it warm which runs every 5 mins.

exports.handler = async (event) => {


    if (await warmer(event)) {
        console.log("Warming");
        return 'warmed';
    }

}

I am wondering if it is possible to turn off logging for the function if the if statement is true, ie it is just a warming request

Thanks

CodePudding user response:

No, there is no such possibility. You can only turn off it in general by removing permissions from the lambda role to write to CW.

  • Related