I want to add trigger event on a Lambda function on an already existing bucket and for that I am using below configuration:
events:
- s3:
bucket: serverlesstest
event: s3:ObjectCreated:*
rules:
- prefix: uploads/
- suffix: .pdf
where bucket serverlesstest is already existing on S3.
This configurations is throwing the error:
An error occurred while provisioning your stack: S3BucketServerlesstest - serverlesstest already exists.
How can I resolve this error using Serverless Framework?