How do I troubleshoot Lambda provisioned concurrency issues?
Last updated: 2022-10-26
I’ve configured provisioned concurrency for my AWS Lambda function but it’s not working. How do I fix this issue?
The following reasons are possible causes for failure after you set up provisioned concurrency for your Lambda function:
- You might be invoking the Lambda function with the $LATEST version of Lambda instead of the version with configured provisioned concurrency.
- All provisioned concurrency is in use, so your Lambda function is invoked with standard concurrency. This causes cold starts.
- Your account has exceeded its burst limit.
Follow these steps to troubleshoot issues with provisioned concurrency:
1. Verify that the Lambda function being used to configure provisioned concurrency isn’t set to $LATEST. That’s because unpublished versions of Lambda functions don’t support provisioned concurrency.
2. In your Lambda function configuration, verify that your provisioned concurrency displays the Ready status.
3. On the Metrics page of the Amazon CloudWatch console, check the ProvisionedConcurrencySpilloverInvocations metric. This metric shows the number of times your Lambda function runs with standard concurrency when all provisioned concurrency is being used.
For more information about provisioned concurrency metrics, see Working with Lambda function metrics and review the Using invocation metrics section.
4. Check if reserved concurrency is configured for the Lambda function. Reserved concurrency limits a function’s ability to scale up.
5. If you still can’t resolve the issue, then open a case with AWS Support. Provide the following information in the case:
- The Lambda function ARN.
- The workflow on the Lambda function setup with all included services.
- Details about whether the issue is intermittent or continuous.
- Complete CloudWatch logs in .txt format from when the issue occurred. These CloudWatch logs are used to identify Lambda function errors that include timeout issues, init durations, and permissions issues.
- The exact timestamp of the issue with the time zone or timestamp in UTC.
Note: AWS Support representatives don’t have access to customer CloudWatch logs due to security and privacy reasons.
For more troubleshooting information, see Lambda: Cold starts with provisioned concurrency.
Note: Unlike reserved concurrency, you incur additional costs by using provisioned concurrency. See AWS Lambda pricing for details about provisioned concurrency costs. To keep provisioned concurrency costs low, consider scheduling provisioned concurrency usage for your organization. For more information, see Scheduling AWS Lambda provisioned concurrency for recurring peak usage.