I'm trying to trigger my function using S3 bucket ...
# help
p
I'm trying to trigger my function using S3 bucket triggers, as per the documentation, but it keeps failing. This is an existing bucket and something I could solve in Serverless using
existing: true
on the event. Anybody have this working in SST? I found this bug in CDK which makes me think it wont work in SST as well... https://github.com/aws/aws-cdk/issues/2004 Any other ideas? Or should I just keep these functions in Serverless for now?
f
Yeah, CloudFormation actually doesn’t allow adding S3 notifications after the bucket has been created.
Serverless Framework does it by using a custom resources and calling the S3 API to add a notification.
Last time I checked, the CDK team is working on implementing something similar. It’s work in process - https://github.com/aws/aws-cdk/pull/11773
Let’s wait for official CDK support. And keep the functions in Serverless Framework for now i think.
p
👍