-
Notifications
You must be signed in to change notification settings - Fork 4k
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
aws_s3: python CfnBucket.EventBridgeConfigurationProperty ignored #26282
Comments
According to this, EventBridgeConfiguration is under NotificationConfiguration. If you really need to configure that with L1 construct(i.e. CfnBucket) you will need to configure that under NotificationConfiguration. Check this out for more details about the Is there any reason you have to use CfnBucket L1 construct like that? Check EventBridge notifications for more details. |
Using the L2 construct for notifications does not fulfill the cloudformation guard rules that Control Tower uses to ensure notifications are set. Tested using cdk-validator https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_s3/CfnBucket.html#eventbridgeconfigurationproperty As you mentioned also tested using the notificationconfigurationproperty, no change in cdk synth output
|
from aws_cdk import aws_s3
testbucket = aws_s3.CfnBucket(self, "testingBucketCfnBucket")
testbucket.EventBridgeConfigurationProperty(
event_bridge_enabled=True,
) This isn't the right syntax if you're trying to modify the property in this manner. Prefer to use from aws_cdk import aws_s3
testbucket = aws_s3.CfnBucket(self, "testingBucketCfnBucket")
testbucket.notification_configuration.event_bridge_configuration.event_bridge_enabled = True |
|
Describe the bug
Trying to enable event bridge events on an s3 bucket using the L1 CfnBucket.
event_bridge_enabled property looks to be ignored.
cdk synth, generates this snippet
Expected Behavior
Expecting cdk synth to generate
Current Behavior
event_bridge_enabled setting is ignored.
Reproduction Steps
Possible Solution
Broke out into an override to add the parameter
Additional Information/Context
No response
CDK CLI Version
2.87.0
Framework Version
No response
Node.js Version
18.16.0
OS
MacOS Ventura 13.4
Language
Python
Language Version
Python 3.9.6
Other information
No response
The text was updated successfully, but these errors were encountered: