2

I have a microservices project using Serverless Framework that has the following structure:

project
└───service1
│   │   handlers.py
│   │   serverless.yml
│   │   requirements.txt
|   |   package.json
└───service2
└───service3
└───service4

Each folder is a microservice and each microservice has its own serverless.yml configuration file.

I would like to know what is the best way to run the project in a totally local way.

I've already tried using the serverless-offline plugin, but it only runs one microservice at a time offline.

I've read a bit about creating an AWS virtual environment with localstack, but I don't know how it would actually help me.

I would like a tip, an article or any information that can help me run these microservices locally.

PS.: I'm using python

1 Answers1

0

I would keep only 1 serverless.yml inside ./project. Then have 4 functions inside serverless.yml with handlers pointing to corresponding handler.py, this way you'll have 4 lambdas.

This way you may use serverless-offline with no problem and still have 4 microservices.

Stefan Drl
  • 53
  • 7