Bucket multiple notifications #8538
Labels
@aws-cdk/aws-s3-notifications
bug
This issue is a bug.
in-progress
This issue is being actively worked on.
p1
I'm trying to subscribe a lambda function to multiple prefixes in a single bucket. But
bucket.addEventNotification()
throws the following error. Bucket and lambda functions are created in the same stack.Reproduction Steps
Error Log
cdk synth
returns the error:There is already a Construct with name 'AllowBucketNotificationsFromBucket3E8F7BBA' in Function [SingletonLambda8d4cbf0bc03e4460b43ab4696174d04b
Verbose output:
Environment
Other
It's not clear why multiple notifications aren't allowed. Seems the error is due the same lambda permission being created for both notifications. I suppose I could work around this by creating 2 lambda functions with the same code (didn't try) but I'd prefer to have a single lambda function so monitoring etc. becomes simpler.
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: