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?

asked 2 years ago1134 views
1 Answer
1
Accepted Answer

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.

SUPPORT ENGINEER
answered 2 years ago
  • This looks to have been the problem. Thanks for your help.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions