AWS Lambda function created via cloudformation doesn't log
Feb 2022 - this post is permanently moved to https://architectfwd.com, my new site, and can be found here - https://architectfwd.com/architecture/cloud/amazon-web-services-aws/lambda/2022/01/23/aws-lambda-function-created-via-cloudformation-doesnt-log/ please go and bookmark that site for all of my future content.
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:*"
]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
Cheers
Quintes