Deploy-succeeded function is not logged

I would like to call function when deploy are succeeded.
I create deploy-succeeded.js and when I start the deploy, the function is reconize
But when I click on this function I get this error

My function is just :

exports.handler = function (event, context, callback) {
      console.log('Begin of function')
      console.log(event, context, callback)
      callback(null, {
        statusCode: 200,
        body: JSON.stringify({
          message: `Hello world`

Do you have any idea ?

Thank you !

Hiya @yohan and sorry to hear about the trouble!

Some of our event-triggered functions don’t log well (and all function logs last only an hour anyway, just FYI), so I’d recommend renaming the function to something else, and configuring an API notification to use it:

You can find that settings card in my screenshot, at the bottom of your site’s deploy settings page. This should allow it to log reliably!