I've read about people switching over from Docker (container) to AWS Lambda (serverless) but what scratches my head is, are there any performance (latency and cold start especially) difference? I mean, both are quite similar, so there shouldn't be any difference at all?
Let's say you create a single function that returns a certain calculated number, and you deploy this as Lambda function and to docker. My guess is that both should perform that function equally fast, am I wrong?
My question: Why should you prefer one over the other?
My understanding is that AWS Lambda functions are just like Docker except they're "smaller" and stateless and only runs when the function is being called.