Sls deploy and sls offline with Multiple Serverless.yml in a project

My serverless project was structured like this before,

├── serverless.yml
├── package.json
├── node_modules
├── test
├── src
    ├── handler.js
    ├── function1
          └── function1.js
    └── function2
          └── function2.js

commands sls invoke test, sls offline, sls deploy works fine
This structure was perfect until CloudFormation's 200 Resource Limit error.

I changed the structure to have multiple serverless.yml file as suggested here: https://serverless.com/blog/api-gateway-multiple-services/

├── package.json
├── node_modules
├── test
├── src
    ├── function1
          ├── serverless.yml
          ├── handler1.js
          ├── function1A.js
          └── function1B.js
    └── function2
          ├── serverless.yml
          ├── handler2.js
          ├── function2A.js
          └── function2B.js

The problem now I have is, I will have to deploy sls deploy the functions individually. sls offline have to be run on different ports.
Even then, the problem doesn’t solve.
How can I run these function with the offline plugin and also deploy in single command?

Hey there, have you found a solution for it? I am looking for the solution using webpack and share common data between the serverless files…

Thanks

Yes I did. I restructured my application as I mentioned.
Used webpack, babel to share common resource. Works perfect for me.
You can Refer This

Hi - can you explain a bit about how you’ve used webpack to solve the issue of sls offline with multiple serverless.yml files? We already use webpack but still need to get round the CloudFormation 200 resource limit. I’ve not found a nice way to solve it so far.

Hi martingo,

I am also searching for the solution to deploy multiple yml files with single command, have you found it?