3

My use case is as follows,

I have built a rest api written in nodejs with serverless and when deployed will create lambdas and an api gateway that gives url which works fine. However, I will have multiple clients who would want to use this application (with their clients consuming the api) and I wouldn't want to duplicate the lambda's for each client as the business logic wouldn't change. What would be different is the stage variables set in the api gateway for each client.

Is there a way I can deploy and manage this using serverless, so that when a new client comes on board, I should be able to do something like update the serverless.yml with new api gateway details and then running the deploy command would generate the new gateway with it's own stage variables sharing the previously created lambdas. Hope, the question is clear and apologies if this has been previously asked and answered.

Rohith Mohan
  • 187
  • 1
  • 14
  • Do you need the ability to deploy different versions of code to different clients? Or is *every* stage *always* backed by the same lambda code? – Mike Patrick Jun 14 '18 at 23:46
  • @MikePatrick The code will remain same for all the client. However, each clients will have their own stage variables (and their own custom domains which I think is possible to maintain using serverless with the custom domain plugin) that differentiates them. – Rohith Mohan Jun 15 '18 at 00:17
  • Why deploy a new gateway rather than creating a new stage ? You could have only 1 gateway with multiples stages, each stage with their own variables. – Anne Aug 23 '19 at 15:13

0 Answers0