2 ms·
In my opinion and experiences lambda's should be the smallest reasonable functionality you can assemble that does only 1 thing well. Lambda's can interact with
by davismwfl 7y ago
In my opinion and experiences lambda's should be the smallest reasonable functionality you can assemble that does only 1 thing well.
Lambda's can interact with databases and most external systems, but you want to keep them short and sweet. They take time to spin up on first run (100ms or so), and can run a maximum of 15 minutes.
Yes you can use threads/processes in Lambda's but usually to me it is a sign you are trying to do too much in a single piece of code, but there are exceptions of course. You can use step functions to coordinate multiple lambda's which is usually the better answer but not always.
And I'd say no, lambda's should not try to serve as a web service API, they can be components of the API but the API should be hosted elsewhere, like AWS API Gateway or your own EC2 instance etc.