Lambda is not triggered if S3 server was already started by another serverless project sharing the same S3 service with noStart=true attribute
Suppose if we have two serverless project Project 1 and 2. Project 1: Executed with serverless-offline and starts the S3 server Project 2: In serverless.yml, custom section, noStart=true. This will ensure that it will reuse the s3 server started by Project 1. This project contains a lambda with an S3 bucket trigger even source mapping.
When an object is pushed in bucket, lambda defined in project 2 is not triggered. However, if we remove the noStart=true and start the project 2 before project 1. Lambda of Project 2 gets triggered.
This means lambda will not be triggered if S3 server was started by some other project, although the S3 is shared accross all the project using noStart=true in other projects.
When we execute the project 2(which has noStarts=true) and if it contains any s3 event source mappings with lambda in function section of serverless.yml, then we CANNOT see a line in log:
Serverless: Found S3 event listener for
But this line appear if S3 server was started by project 2 itself by executing it before project 1.
Hi @amar02041988 . Thanks for your comment. And I’m sorry for your inconvenience. serverless-s3-local doesn’t support noStart option and S3 event at the same time. Because serverless-s3-local assigns its event handlers to S3 server at the launching. If you don’t mind, please try to collect all event handlers into one serverless.yml.