0
votes

I got a .net core serverless application consisting of serveral lambda functions and I am using SAM for packaging and deployment.

The lambda functions definition in the SAM template contain their implicit API definition (and I want to keep it that way).

Now I need to define some additional API resources besides the lambda functions (e.g. S3 proxy).

But when I add an AWS::Serverless::Api resource to the SAM template and deploy it, I end up with two separate APIs in the API gateway.

For the explicit API definition I basically configured the API in the AWS console and then exported it as swagger and used the swagger json in the DefinitionBody property of the resource.

Is there a way to use implicit API definitions from the lambda functions and the explicit API definition from the resource similtaneously and get them merged into a single API in the API gateway?

1

1 Answers

0
votes

Solved: Declare all functions/api implicit AND explicit in swagger. Add a reference to the Serverless::API in all implicit api declarations to avoid ending up with 2 apis.