Re:AWS Lambda pricing now per ms
by dodobirdlord on Tuesday December 01, 2020 @08:43PM
(#25272346)
If your lambda function detects that it is going to hit the timeout you could have it launch a Fargate container to handle the long merge. Fargate is essentially a long-lived Lambda.
Re:AWS Lambda pricing now per ms
by mcintyre1994 on Wednesday December 02, 2020 @02:34AM
(#25274049)
Itβs also probably much easier to share code between those two implementations with the new container based lambdas :)
Re:AWS Lambda pricing now per ms
by BoorishBears on Tuesday December 01, 2020 @05:39PM
(#25271009)
That sounds like you need a queue of some sort
One example we've been wrestling with is a merge operation. Usually it's merging about 1000 records which completes in a few seconds. But every once in a while someone kicks off a job that tries to merge 1,000,000 records and it times out.
We want the benefits of serverless (scale down to zero, up to infinity at the drop of a hat) but these edge cases mean we're having to evaluate other options.
An hour or two would be a good start; then it'd cover 99.9% of requests. With a few hours we could add more nines :)