Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s3: set EventBridgeEnabled using CloudFormation not CustomResource #24086

Open
2 tasks
zaccharles opened this issue Feb 9, 2023 · 3 comments
Open
2 tasks

s3: set EventBridgeEnabled using CloudFormation not CustomResource #24086

zaccharles opened this issue Feb 9, 2023 · 3 comments
Labels
@aws-cdk/aws-s3 Related to Amazon S3 feature-request A feature should be added or improved. p2

Comments

@zaccharles
Copy link

Describe the feature

The eventBridgeEnabled property on the S3 Bucket construct results in provisioning a custom resource to enable or disable EventBridge notifications.

I'm guessing this was added before CloudFormation supported this, but it does now.

Use Case

This is especially bothersome when creating templates for Service Catalog products, as they can't easily use CustomResources like regular stacks.

In general, it just seems unnecessary to create everything around this CustomResource for something we could do natively.

Proposed Solution

Set NotificationConfiguration.EventBridgeConfiguration.EventBridgeEnabled to true|false based on the eventBridgeEnabled prop and don't use the CustomResource.

Other Information

No response

Acknowledgements

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

CDK version used

2.64.0

Environment details (OS name and version, etc.)

Mac OS 13.1

@zaccharles zaccharles added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Feb 9, 2023
@github-actions github-actions bot added the @aws-cdk/aws-s3 Related to Amazon S3 label Feb 9, 2023
@pahud pahud added p2 and removed needs-triage This issue or PR still needs to be triaged. labels Feb 16, 2023
@pahud
Copy link
Contributor

pahud commented Feb 16, 2023

I'm not sure when cloudformation has added this support but yeah we probably should opt in the native support instead.

@wolfadr
Copy link

wolfadr commented Aug 25, 2023

Using an escape hatch works until it is "fixed" in the L2 construct:

(bucket.node.defaultChild as CfnBucket).notificationConfiguration = {
  eventBridgeConfiguration: {
    eventBridgeEnabled: true,
  },
};

@yerzhan7
Copy link
Contributor

This is duplicate of #26772

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-s3 Related to Amazon S3 feature-request A feature should be added or improved. p2
Projects
None yet
Development

No branches or pull requests

4 participants