Closed kaizencc closed 1 year ago
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Did this property go away? OP's link to the CloudFormation docs no longer shows anything about DeleteLambdaResourcesOnCanaryDeletion.
As part of stabilizing the synthetics
module I see @kaizencc has cleaned up DeleteLambdaResourcesOnCanaryDeletion
property in this PR. Also, instead of enableAutoDeleteLambdas
you could use cleanup: Cleanup.LAMBDA
the same affect via custom resource.
Do you know if CloudFormation itself supports deleting the lambda? I'm not actually using the CDK, just landed here because OP had a link to the CloudFormation docs that looks like it mentioned the kind of option I need.
Describe the feature
Lambda has a new? property that will delete lambda resources when the canary is deleted.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-synthetics-canary.html#cfn-synthetics-canary-deletelambdaresourcesoncanarydeletion
This is a step in the right direction, but still not perfect, because canaries will still isolate s3 buckets, log groups, etc. Still, we should support this property in the L2 and allow our users to specify this prop.
Use Case
Currently, after deleting the canary you have to go and manually delete lambda/s3/cloudwatch logs. Now, you can set this property and only delete s3 + cloudwatch.
Proposed Solution
Add the prop to
Canary
. This will need some testing to make sure that the property is doing what we expect.Other Information
No response
Acknowledgements
CDK version used
latest
Environment details (OS name and version, etc.)
MacOs