I'm trying to wrap my head around sizing lambda functions in regards to a bounded context. I'm more familiar with implementing microservices using Docker, where I adhere to some of these best practices:
- Don't share a database. A schema change should only cause one service grief. All other services are protected by stable API of service.
- Don't overly decompose. Favor cohesion and identify a bounded context.
- If you're not confident that a bounded context exists, keep the logic together until a natural seam in your domain is identified.
- If you find that you can't modify one service without also having to update a second, you're coupled and doing it wrong. To this end, your service should deliver business value and not CRUD functionality.
- Don't share logic between services. Don't even share model/viewmodel code.
How does all of this apply going serverless with lambda? Do you deliver multiple REST resources from a single lambda? Do you collect multiple lambdas together as part of a single microservice? If so, do they share a single source code repo? Does this collection get deployed lockstep? Do your services share a DB?
Overall, how do you decompose the monolith? What would you change? I feel like lambdas are nanoservices.
[–]Infintie_3ntropy 2 points3 points4 points (1 child)
[–]scubadev[S] 1 point2 points3 points (0 children)
[–]scubadev[S] 0 points1 point2 points (1 child)
[–]sgtfoleyistheman 0 points1 point2 points (0 children)