claudiajs / claudia-api-builder

Use AWS API Gateway as if it were a lightweight JavaScript web server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple Lambdas per API Gateway

schafer14 opened this issue · comments

Is there a way that two lambda functions monitored Claudia can point to the same api. For instance if I wanted to create two crud modules controlled in separate claudia projects but using the same api is there a way of specifying a merge so claudia updates will not clobber the existing api?

no, and this is a design choice. you can still create a different API and maintain it separately, that points to the main Lambda code, or you can create two separate sub-apis (eg /first/... and /second/...) and then map that to different URLs using cloudfront, or if the endpoints are the same, use something in the context (eg originating URL or a header) to decide between which implementation to use