Why is there a long delay between CREATE_IN_PROGRESS event for a Lambda-backed CloudFormation custom resource and the Lambda function invocation?

0

I am deploying a CloudFormation stack with a number of Lambda-backed custom resources which load data into AWS. These Lambda functions take approximately 7 minutes to execute, and a number of them are run in parallel by having multiple custom resources backed by the same Lambda function. The total time from the first CREATE_IN_PROGRESS event for these resources approximately matches the time it takes for the Lambda function to run, and they run successfully.

There are further custom resources (using different Lambda functions) that run after the previously custom resources are complete. However, we are seeing unusual behaviour for these custom resources, as there is a significant wait from the first CREATE_IN_PROGRESS event to the Lambda function actually being invoked (as seen in the logs for the Lambda function). This was has been from 10 minutes to over an hour, sometimes causing the custom resource to time out without the Lambda function ever being invoked. It appears that the events from CloudFormation which normally trigger the custom resource Lambda are being significantly delayed.

Why might this be?

已提問 2 年前檢視次數 1152 次
1 個回答
1
已接受的答案

Hello,

Based on my understanding on your use-case, this could be related to concurrency limit on Lambda function.

You can refer to Managing Lambda concurrency to understand more about types of concurrency controls available.

Additionally, you can also refer to knowledge center document if wish to request a concurrency limit increase for Lambda function.

I hope above information was useful and help you to resolve the issue.

支援工程師
已回答 2 年前
  • This looks to have been the problem. Thanks for your help.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南