Skip to content

(aws-s3): adding prop to enable EventBridge in S3 BucketProps #18076

@mickychetta

Description

@mickychetta

Description

We can now use Amazon S3 Event Notifications with EventBridge to create new event driven applications after this announcement.

In order to take advantage of this feature, S3 must have enable EventBridge in the properties sections:
image

It is a resource in CloudFormation but not a resource in CfnBucket yet.

Use Case

In Solutions Constructs, we have a construct aws-s3-stepfunctions that uses S3 Event Notifications to send to EventBridge then trigger a state machine. At the moment we are using escape hatches to override the prop.

cfnBucket.addPropertyOverride('NotificationConfiguration.EventBridgeConfiguration.EventBridgeEnabled', true);

It is in CloudFormation but not yet in the CDK, It would a nice feature to have a prop to enable EventBridge.

Proposed Solution

Add an optional prop to the CDK S3 BucketProps called eventBridgeEnabled: boolean. The resource is currently missing in CfnBucket and i'm not sure how to approach this but any pointers would be great so I can start working on it.

Another feature up for discussion is if it can be changed for an existing bucket? If it can, then will probably want an enableEventBridge() method on Bucket and IBucket.

Other information

No response

Acknowledge

  • I may be able to implement this feature request
  • This feature might incur a breaking change

Metadata

Metadata

Assignees

Labels

@aws-cdk/aws-s3Related to Amazon S3feature-requestA feature should be added or improved.needs-triageThis issue or PR still needs to be triaged.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions