New for AWS Lambda – Predictable Startup Times with Provisioned Concurrency
aws.amazon.com
aws.amazon.com
So take us-east-1; normally you pay $0.000016667 for every GB-second + $0.20 per 1M requests.
By my reading if you turn on reserved concurrency 1 to keep a low-usage Lambda hot it changes to:
$0.000004167 for every GB-second: so $10.80 for a 30-day month. Requests are $0.20 per 1M requests - same. Duration changes to $0.000009722 for every GB-second for the Lambda-that-is-kept hot.
OK I have to put those on lines next to each other to see it, too many zeroes for my eyes:
$0.000016667 on-demand vs: $0.000009722 reserved concurrency
Alright, so that's 58% of the normal cost, so you can draw a graph and find some crossover point of duration where that gets cheaper - exercise left to the reader - but that fights against the Lambda already being kept hot by usage. I can't process intuitively whether this is a good deal or not.
It's awkward - Lambdas spinning a microVM in 1-2s for cold starts (NodeJS, maybe dotnet, I don't use it but I understand other runtimes can stretch well past this) is pretty impressive, but in a chain of calls multiplied up it adds up fast.
Using this with autoscaling to try to get ahead of predictable usage patterns, looks potentially useful, I think.
With lots of separate Lambdas, using this to avoid cold starts on low-usage functions, I don't know, that $10 each adds up fast.
The operational benefits were never there as were promised. Lambdas on the teams I've worked on have always required more setup, more thought into provisioning, more... Operations... than containers, or even running well-thought-out AMI autoscaling groups before them.
I hope this helps. Figuring out how to run lambdas right is a pain.