Why since CDK 1.23 Function construct uses a custom resource for handling log retention instead of using simple LogGroup resources with retention conf already available in Cloudwatch? #28564
flaviostutz
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was inspecting the template generated by my CDK application and realised that the Lambda Function construct is creating a custom resource for handling log retention from log groups in Cloudwatch for the function. A custom Lambda function is deployed specifically for implementing this.
I've been using LogGroup resource with a configured RetentionDays attribute for a while without any problems before.
Could someone explain why CDK decided to change to the custom resource approach? I got very curious now.
(here you can see exactly an example of what I am saying: https://milangatyas.com/Blog/Detail/8/set-aws-lambda-log-group-retention-with-aws-c)
Beta Was this translation helpful? Give feedback.
All reactions