You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(synthetics): enable auto delete lambdas via custom resource (#26580)
Synthetics [used](https://aws.amazon.com/about-aws/whats-new/2022/05/amazon-cloudwatch-synthetics-support-canary-resources-deletion/) to have a property `deleteLambdaResourceOnCanaryDeletion` that has since been deprecated and erased from cloudformation docs. Although this property still works today synthetics makes no promises that this is supported in the future.
Here in CDK land, this PR serves as a replacement to the `deleteLambdaResourceOnCanaryDeletion` property (called `enableAutoDeleteLambdas` on the L2 Canary) by implementing a custom resource similar to what we have in S3 and ECR.
**This PR deprecates `enableAutoDeleteLambdas` in favor of `cleanup: cleanup.LAMBDA`, an enum that achieves the same thing but via custom resource**
Closes#18448
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
* @deprecated this feature has been deprecated by the service team, use `cleanup: Cleanup.LAMBDA` instead which will use a Custom Resource to achieve the same effect.
198
223
*/
199
224
readonlyenableAutoDeleteLambdas?: boolean;
200
225
226
+
/**
227
+
* Specify the underlying resources to be cleaned up when the canary is deleted.
228
+
* Using `Cleanup.LAMBDA` will create a Custom Resource to achieve this.
229
+
*
230
+
* @default Cleanup.NOTHING
231
+
*/
232
+
readonlycleanup?: Cleanup;
233
+
201
234
/**
202
235
* Lifecycle rules for the generated canary artifact bucket. Has no effect
203
236
* if a bucket is passed to `artifactsBucketLocation`. If you pass a bucket
0 commit comments