Provision Concurrency not keeping AWS Lambda function warm and it still has initialization time
Asked Answered
W

0

8

I was trying to set up lambda with provisioned concurrency. I enabled this feature for the latest version of my lambda function.

enter image description here

After that, i ran this function and watched logs in AWS X-RAY. I saw that my function, still has initialization, but it should become warm with provisioned concurrency.

log first(cold) start (with provisioned concurrency) from x-ray

Without latency, after first start, i ran it twice and it became warm as expected (because it is a default behaviour when lambda became warm after first start without provisioned concurrency).

log warm lambdas after first start

I waited 15 minutes and was trying to start my lambda again and still it still has initialization time in the logs. It doesn't become warm with provisioned concurrency as expected and always has initialization time.

second try of cold start

How can i resolve it?

Waadt answered 7/12, 2020 at 12:34 Comment(2)
Was this a docker container deployment, zip archive, or inline code lambda? Also just because the initialization time is showing, doesn't mean that the lambda wasn't warm, does it? What is the observed response time, when making an API call directly to the Lambda/Invoke API?Lyte
When the function was invoked, was it invoked with the version/qualifier for which provisioned concurrency was set, or with $LATEST?Unarm

© 2022 - 2024 — McMap. All rights reserved.