The cloudwatchLog property is monitoring EVENTS from /aws/lambda/a, not writing to it. When something gets written to that log, anything that matches appFilter should get sent in as an event to this function.
console.log statements write to the the default log group created by Serverless. This is in the form of /aws/lambda/your-function-name.
Thank u for your answer
I don’t use EVENTS so I removed the all resources and cloudwatchLog
I uploaded again my functions but I still continue to don’t see any logs in cloudwatch, no stream log, nothing
Have you tried executing your function from the Lambda dashboard? That will show you want you are logging and will link you directly to the correct CloudWatch log group.
The log groups should be visible immediately after deployment. The log streams won’t be visible until after your Lambda has executed.
Go to CloudWatch in the AWS Console then Logs. If you don’t see the log groups then check you’re looking in the same region you deployed your Lambda to.
If you are certain you’re in the right region then go to Lambda in the AWS Console. Click on one of the Lambda you have executed recently. Go to the Monitoring tab and confirm the Lambda was executed. If your Lambda hasn’t been executed then you need to figure that out first. Click on Jump to Logs to see log entries. You might not see log entries (sometimes it happens when viewing all streams) but if you go back to the log group using the breadcrumbs you will see all of the log streams. Clicking on the most recent log stream will show you the entries.
If everything else fails - is it possible you deleted the log groups manually? Try completely removing the project using sls remove then deploying using sls deploy. Repeat the checks.
I cannot see the log but also in graphics I don’t see execution time and execution count, still 0!
when I’ll try to access at my lambda from the url continue to say: {"message":"Unauthorized"}
Log in to the AWS Console and go to the Lambda service console. Then click on the function you want to test. This will open up the details of the function. At the top there is an option to “TEST” the function. Click test and then create a sample event. You can use the default or select a preconfigured one from the drop down. Save it, and then click “TEST” again. It will run the function and show you the output and logs with a link to the CloudWatch log group.