Describe the bug
Currently, when importing an existing bucket, is possible to add EventNotifications to that bucket.
This is not possible for Eventbridge, indeed the existing enableEventBridgeNotification method is protected and not exposed in the IBucket interface either.
Expected Behavior
ability to enable Eventbridge notifications in existing buckets. eg
import * as s3 from 'aws-cdk-lib/aws-s3';
...
const bucket = s3.Bucket.fromBucketName(this, 'MyBucket', 'my-bucket-name');
bucket.enableEventBridgeNotification();
Current Behavior
the enableEventBridgeNotification is not exposed, thus not callable. The only way to enable Eventbridge notifications is by creating a new bucket and providing eventBridgeEnabled flag to true
eg.
import * as s3 from 'aws-cdk-lib/aws-s3';
...
new s3.Bucket(this, 'MyBucket', {
eventBridgeEnabled: true,
})
Reproduction Steps
Try to import a bucket as explained in the Expected Behavior section to verify that the method is not listed in the allowed one
Possible Solution
make the enableEventBridgeNotification public and expose it through the IBucket interface
Additional Information/Context
N/A
CDK CLI Version
2.28.1
Framework Version
No response
Node.js Version
16.15.0
OS
macOS 12.4
Language
Typescript
Language Version
3.9.7
Other information
No response
Describe the bug
Currently, when importing an existing bucket, is possible to add EventNotifications to that bucket.
This is not possible for Eventbridge, indeed the existing enableEventBridgeNotification method is protected and not exposed in the
IBucketinterface either.Expected Behavior
ability to enable Eventbridge notifications in existing buckets. eg
Current Behavior
the
enableEventBridgeNotificationis not exposed, thus not callable. The only way to enable Eventbridge notifications is by creating a new bucket and providingeventBridgeEnabledflag totrueeg.
Reproduction Steps
Try to import a bucket as explained in the
Expected Behaviorsection to verify that the method is not listed in the allowed onePossible Solution
make the
enableEventBridgeNotificationpublic and expose it through theIBucketinterfaceAdditional Information/Context
N/A
CDK CLI Version
2.28.1
Framework Version
No response
Node.js Version
16.15.0
OS
macOS 12.4
Language
Typescript
Language Version
3.9.7
Other information
No response