-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@aws-cdk/aws-synthetics: Canary within VPC won't delete ENI and its associated lambda when undeploy #22282
Comments
Could you provide reproduction code please @ynyany? You're using our L2 Canary construct or a CfnCanary? |
I am using L1 canary, but looked into L2 canary, it should be the same. gitst of the canary code
where VPC is just a new vpc created by
nothing special, the CFN provided did not delete the lambda associated with the lambda, therefore the ENI. because of those behavious the whole stack can not be deleted. |
Furthermore, there's an AWS blog to similar issue (outside vpc) https://aws.amazon.com/blogs/mt/delete-amazon-cloudwatch-synthetics-dependent-resources-when-you-delete-a-cloudformation-stack/ |
Hi @ynyany, this is not a CDK bug. The behavior you describe is how Canaries work -- when you delete the canary, you must manually delete the underlying resources on your own. There is an issue we're tracking for supporting this as a feature request: #18448 but we're not likely to take that up soon. If you need an automated way to delete resources that come with your canary, my only suggestion is to follow the blog post you've linked and/or +1 the issue I've linked. |
|
Describe the bug
cwyn-xx
) and the ENI it createdif I manually remove the lambda and its ENI then the stack can be deleted.
Expected Behavior
Stack delete automatically including the lambda (behind the canary and its ENI created)
Current Behavior
can not delete the lambda (behind the canary and its ENI created) automatically
Reproduction Steps
cwyn-xx
) and the ENI it createdPossible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.42.1
Framework Version
No response
Node.js Version
14
OS
macos
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: