(aws_s3): Enabling EventBridge notifications on an s3 bucket removes existing notification configuration #29653
Labels
@aws-cdk/aws-s3
Related to Amazon S3
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p1
Describe the bug
We have an s3 bucket where its notification configuration is being updated in a different stack. When we set
eventBridgeEnabled
to true CloudFormation makes aPutBucketNotification
call with a payload{ "EventBridgeConfiguration": {} }
without the current notification configuration. This call overrides the current configuration by removing all the existing configuration setup in a different stack. I wonder if this is a bug or intentionally set to work with this way? If this is not a bug can you please guide with a proper workaround?Here is a working example;
This is the PutBucketConfiguration call made by CloudFormation in the first deployment;
And here you can see it doesn't include the existing configuration after we enable EventBridge for the bucket
Thanks
Expected Behavior
CloudFormation should keep the current notification configuration and make a proper PutBucketNotificationConfiguration call to preserve existing configuration.
Current Behavior
Enabling
eventBridgeEnabled
setting on a s3 bucket causes all existing configuration to be removed when configured with a cross-account fashion.Reproduction Steps
AppStack
andOtherStack
without havingeventBridgeEnabled
property enabled on s3 bucketeventBridgeEnabled
to true and deploy the stacks again.Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.121.1
Framework Version
No response
Node.js Version
v18.15.0
OS
macos
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: