Description
I'm wondering if anyone can help me understand some interesting behavior I'm seeing when using the warmer.
If I invoke my function directly through the Lambda console, a cold start is about 6 seconds with subsequent invocations taking less than a second.
However, I would expect now that the function is "warm", that invoking it through API Gateway would NOT result in a cold start but it does.
$ time curl -i https://apigateway.domain.com
real 0m5.787s
user 0m0.087s
sys 0m0.011s
A subsequent request through API Gateway does not have a cold start
$ time curl -i https://apigateway.domain.com
real 0m0.349s
user 0m0.082s
sys 0m0.020s
What's even stranger, if I quickly invoke the Lambda function again with a "warmer" event, it seems to break something in API Gateway causing it to have a cold start again when invoking through the API Gateway domain.
(Test event in Lambda console that mimics "warm" event)
{
"concurrency": 5,
"warmer": true
}
Now if I CURL the API Gateway URL after the "warm" event, I get the API Gateway "cold start" again.
$ time curl -i https://apigateway.domain.com
real 0m6.178s
user 0m0.046s
sys 0m0.007s
Does this behavior make sense to anyone else?