aws-s3: The eventBridgeEnabled
property of the Bucket
Object Errors on Deployment
#24520
Labels
@aws-cdk/aws-s3
Related to Amazon S3
bug
This issue is a bug.
cause/not-a-bug
Not a bug (might still be a documentation issue, might still need work)
p1
Describe the bug
When deploying a stack that has
eventBridgeEnabled: true
on a Bucket object, the deployment fails.Expected Behavior
On deployment, the stack should deploy and enable the EventBridge notification on the S3 bucket.
Current Behavior
The following error is thrown on deployment:
Reproduction Steps
Deploy a stack that includes the following construct:
Possible Solution
Looking at the synthed CloudFormation for this stack, a CloudFormation custom resource is used to configure this setting. The permissions policy for the custom resource role is:
The
action
value is not correct, as the API being used isPutBucketNotificationConfiguration
.Additional Information/Context
No response
CDK CLI Version
2.67.0 (build b6f7f39)
Framework Version
No response
Node.js Version
v18.12.1
OS
Windows 11
Language
Typescript
Language Version
typescript 4.6.3
Other information
Here is the original PR that adds this feature: #18614.
Here is the code that is building the custom resource policy:
aws-cdk/packages/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.ts
Lines 69 to 72 in b2d293d
The PutBucketNotification API has been deprecated at some point and replaced with PutBucketNotificationConfiguration.
The text was updated successfully, but these errors were encountered: