cloudcomponents/cdk-constructs

(cdk-chatops) Lambda functions do not have log group

thomasklinger1234 opened this issue · 4 comments

Summary

In cdk-chatops (https://github.com/cloudcomponents/cdk-constructs/blob/master/packages/cdk-chatops/src/msteams-incoming-webhook-configuration.ts#L38) the lambda function does not have a log group associated. This creates a lot of stale resources when I am regularly deleting and re-creating my codepipelines.

Is there a possibility to create the log group (or inject it)?

@thomasklinger1234 How do you want to do that? Lambda creates the log group automatically.

@thomasklinger1234 How do you want to do that? Lambda creates the log group automatically.

You can create a Log group called /aws/lambda/${lambdaFunction.name} and Lambda will happily write to that log group. Now you can also control the retention and manage the log group with CloudFormation / CDK

We could switch incomingWebhook from private to public readonly. Then you could create the Log group with the function name

We could switch incomingWebhook from private to public readonly. Then you could create the Log group with the function name

That would be awesome!