I have a lambda function with a console.log before the callback is called. When I go to CloudWatch I see the logs (same as you would see using the --log option) but I don’t see the console.log. I have been searching everywhere, but I can’t find any examples.
However, if I go to the lambda console in aws and run a test, I am able to see the console.log in the “Execution result: succeeded” screen. So for some reason the logs are there, but don’t make to cloudwatch.
I also have other lambda functions created outside serverless where I can see the logs in cloudwatch.
I believe the issue is with iamRoleStatements (not having the correct roles). What roles do I need to make lambda console.log show up in cloudwatch?