aws-s3: eventBridgeEnabled creates redundant resources #29932
Labels
@aws-cdk/aws-s3
Related to Amazon S3
bug
This issue is a bug.
duplicate
This issue is a duplicate.
effort/medium
Medium work item – several days of effort
p2
Describe the bug
When creating a new Bucket with
eventBridgeEnabled = true
, redundant resources are created as well.Expected Behavior
The snippet
const bucket = new s3.Bucket(this, 'MyEventBridgeBucket', { eventBridgeEnabled: true, });
creates a new
AWS::S3::Bucket
resource witheventBridgeEnabled = true
only.Current Behavior
The snippet
const bucket = new s3.Bucket(this, 'MyEventBridgeBucket', { eventBridgeEnabled: true, });
creates not only a
AWS::S3::Bucket
, but also the following resources:Custom::S3BucketNotifications
AWS::IAM::Role
AWS::IAM::Policy
AWS::Lambda::Function
Reproduction Steps
const bucket = new s3.Bucket(this, 'MyEventBridgeBucket', { eventBridgeEnabled: true, });
Possible Solution
No response
Additional Information/Context
Was also reported in #26772 but closed without fix.
CDK CLI Version
2.137.0 (build bb90b4c)
Framework Version
No response
Node.js Version
v20.12.1
OS
Mac OS 12.7.4 (21H1123)
Language
TypeScript
Language Version
TypeScript (5.4.5)
Other information
No response
The text was updated successfully, but these errors were encountered: