Search code examples
.netamazon-web-servicesaws-lambdaamazon-dynamodbserverless

.NET AWS Serverless project


We create a new project and we would like to try to use lambda in aws (functions in azure) and create serverless application. The project for now isn't so big but the project has potencional been huge. Do you think is it a good idea? And can I still use some patterns like cqrs, clean architecture etc.? Because I don't want to write all logic to function handler. But I don't know if it is ok.

Thank you for your help


Solution

  • It is always better to use Lambda (serverless functions) for specific functionality and not as a whole application. Lambda has its own limitations when it comes to uptime (15 mins), after which your lambda will have to be triggered again. However, it gives excellent benefit on horizontal scaling, performing the functionality much faster for example when you have to insert messages to SQS queue or dynamodb. You can build lambda with cqrs, nice architecture, api calls, tests etc as usual. But it is ideal not to dump too many functionalities in single lambda function. Keept it simple.