Repository navigation
Commit 7360a88
authored
fix(s3-notifications): cdk destroy deletes external/existing s3 notification events (#29939)
### Issue # (if applicable)
Closes #29004
### Reason for this change
`cdk destroy` removes all event notifications configured on an existing S3 bucket instead of only CDK managed event notifications. This occurs whenever a stack that creates an event notification for an existing bucket is deleted or rolled back.
### Description of changes
Add a `Delete` statement which will only remove the ones created from within the stack
### Description of how you validated changes
Manually tested this.
### Checklist
- [ ] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*1 parent 209ffd9 commit 7360a88
46 files changed
Lines changed: 686 additions & 331 deletions
File tree
- packages
- @aws-cdk-testing/framework-integ/test
- aws-lambda-event-sources/test
- integ.s3.imported-bucket.js.snapshot
- integ.s3.js.snapshot
- aws-s3-notifications/test
- integ.notifications.js.snapshot
- lambda/integ.bucket-notifications.js.snapshot
- sns/integ.sns-bucket-notifications.js.snapshot
- sqs
- integ.bucket-notifications-unmanaged.js.snapshot
- asset.30d328e47ab6c6a4d0d137aac9e53e30955ac7469bcb2be4a49f9baf5cfc2f9c.bundle
- integ.bucket-notifications.js.snapshot
- asset.30d328e47ab6c6a4d0d137aac9e53e30955ac7469bcb2be4a49f9baf5cfc2f9c.bundle
- aws-s3/test/integ.bucket.notifications.js.snapshot
- @aws-cdk/custom-resource-handlers
- lib/aws-s3/notifications-resource-handler
- test/aws-s3/notifications-resource-handler
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments