DEV Community

Discussion on: Choosing Between AWS Lambda and Docker

Collapse
 
zenbeni profile image
Benjamin Houdu

This is a completely biased analysis towards docker and misses the biggest advantages of going full lambda powered.
Docker is not a standard anymore as Kube does not want it for instance.
Lambda auto-scaling means you only pay what you use (and a lot less than docker when there is few requests to serve), in a big app, compute costs are often way less important compared to the cost of complexity, data, and ops for instance.
Lambda is simply a function, so by definition you can't get anything more portable be it AWS or not. Docker means you have to use a docker system somewhere, you are tightly linked to it.
The fact that each lambda invoke is independant whereas you mix things in a docker, means debugging is harder for instance (race conditions, concurrency, crash of a docker means crash of numerous processes, lambdas are isolated compared to that).
Using a fat-lambda design or lambdalith like express server in a lambda also covers what you think is a bottleneck in lambda packaging, it can be just a node server as well covering multiple REST endpoints for instance.
Finally managing lambdas for your ops takes less time than managing docker to my experience, running k8 for instance is no small task.