(Originally published elsewhere in 2018), AWS Lambda Logging issue and solution.

AWS Lambda function created via cloudformation doesn’t log

I provisioned new lambda functions via AWS CloudFormation but used an existing service role for lambda execution, however found that no logs were being created. Here’s how to fix.

Architect Forward (architectFWD™)

IAM

Go to the role in IAM, edit the policy and add the resource (the new lambda)

"Resource": [ "Existing...", "arn:aws:logs:REGION:XXXX:log-group:/aws/lambda/function-name-here:*" ]

Review and apply.

Log group created and contains logs

Immediately after updating the service role policy to add the resource, execute the function and the CloudWatch log group should be created and populated


Originally published elsewhere on 08 July, 2019.

Quintes van Aswegen

Quintes van Aswegen

24+ years experience in solving business problems and maximising opportunities through technology in a variety of industries, public and private sector internationally. I founded architectFWD™ to provide knowledge and trusted advice in the areas of strategy, technology, cloud and digital to enable organisations to become Digital Leaders.