blogging

AWS CloudWatch Lambda Functions No Log For You! (solved)

Edited with solution at the bottom…

I had a lambda function on AWS that I wanted to check the logs on. I had it setup with CloudWatch permissions, and I was able to see the summary metrics on the Monitoring tab. So, I was a bit surprised when I saw the following:

Other Lambda functions were logging fine. Just not this one. I tried switching the role under permissions, and even tried deleting it and adding it again (it was a dev only function) and no luck with the CloudWatch logs. I’m just going to chalk this up as luck of the draw for getting logs that are viewable in CloudWatch…

If you happen to encounter this same issue, just know you are not alone πŸ™‚

If you happen to have a solution, feel free to add a generous comment.

Solution

I created a new IAM policy that has the same CloudWatch permissions as the AWSLambdaBasicExecutionRole. I then attached that policy to the role assigned to my Lambda function. I executed a test of my Lambda function and then went to CloudWatch. Sure enough, there was my group and my test call had logged properly!

I then switched the permissions back to the original, and executed another test of my Lambda function. The new test logged correctly. This issue kinda reminds me of the SignatureDoesNotMatch issue I encountered back in March.

One thought on “AWS CloudWatch Lambda Functions No Log For You! (solved)

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.