Re:Serverless: slower and more expensive
by dullgiulio on Monday September 23, 2019 @09:31AM
(#21048735)
Yes, but the parent said "statelessness that makes it easier to TEST". It is not stateless in that sense: purity makes it easier to test. Here you need to mock all interactions with external services, just like you'd do with non-serverless applications.
[ Parent
| on HN ]
Re:Serverless: slower and more expensive
by nailer on Monday September 23, 2019 @11:28AM
(#21049816)
It is stateless in that sense. To run your lambda, there needs to be zero things in memory, unlike a traditional express/django/rails or other non-serverless apps.
If your lambda involves persistent storage, your testing might want to wipe or prepopulate the DB with some objects first, but that's not hard and doesn't add complexity, and as mentioned you don't need anything in memory.