Search code examples
c#asp.netamazon-web-servicesaws-lambdaapi-design

Converting ASP.NET API To AWS Lambdas


I have a asp.net core 3.1 API application that I have been using as my backend api.

I have this application hosted in one AWS Lambda Function, with API Gateway, with one HTTP route and having the ASP.NET Core application handle the routing.

Looking around the web and reading docs, it seems the standard would be to have one HTTP API Route per Lambda Function, (So as I interpreted it would mean having every ASP.NET controller of my API in one lambda function).

Meaning since I have 14 routes it would seems I would need 14 lambda functions with API endpoints. Also this would mean basically no longer having a ASP.NET core API, and disassembling the application.

I have no issues in completing this, just wanted to know if this is actually the correct why and the new normal in developing api's.


Solution

  • Yes, one lambda for endpoint (not per controller)