How do I request a concurrency limit increase for my Lambda function?

4 minute read
1

I need to increase my AWS Lambda function's concurrency limit so the function doesn't get throttled.

Short description

To increase your Lambda function's concurrency limit, you must open a quota increase case in the Service Quotas dashboard.

For more information, see Lambda function scaling and configuring reserved concurrency for a function.

Important: When you increase your concurrency limit, you increase the cost of your AWS account. For more information, see AWS Lambda pricing. Your concurrency limit is shared across all the functions in your account that are in a specific AWS Region.

Resolution

Verify the reason to confirm that a concurrency limit increase is required for your use case

Follow the instructions in How do I troubleshoot Lambda function throttling with "Rate exceeded" and 429 "TooManyRequestsException" errors?

To see your current concurrency usage, review your concurrent executions metric in the Service Quotas dashboard.

Calculate your required concurrency limit

Important: Make sure that you request a concurrency limit appropriate for your use case. AWS denies requests for high concurrency limits that don't have a valid use case.

Multiply your function's average runtime duration in seconds by the average number of requests (invocations) the function receives per second. The result is your required concurrency limit.

Important: If you use unreserved concurrency, make sure that the limit isn't higher than the AWS Region concurrency limit.

When you calculate your required concurrency limit, note the following:

  • The default concurrency limit per AWS Region is 1,000 invocations at any given time. However, new AWS accounts have reduced concurrency and memory quotas.
  • There's no maximum concurrency limit for Lambda functions. However, limit increases are granted only if the increase is required for your use case.
  • To avoid throttling, it's a best practice to request a limit increase at least two weeks before the increase is needed.
  • If you use Lambda with CloudFront Lambda@Edge in Amazon CloudFront, then you must open a separate quota increase case for each Region.

Example concurrency limit calculation

60-second average function runtime duration x 20 requests on average per second = 1,200 required concurrency limit

Include all relevant Lambda function information for your concurrency limit increase

Make sure that your request for a concurrency limit increase includes the following details:

  • New concurrency limit that you're requesting
  • Anticipated average number of requests that your function receives per second
  • Anticipated highest number of requests that your function receives per second
  • Anticipated runtime duration
  • Function memory size
  • Invocation type (event or request-response)
  • Event source
  • Load test results that explain the reason why the quota increase is needed
  • Any additional information to help support your use case

Open a quota increase case in the Service Quotas dashboard

Complete the following steps:

  1. Open the Service Quotas dashboard.
  2. For Manage quotas, choose AWS Lambda.
  3. Choose View quotas.
  4. On the Details page, choose Request increase at account level.
  5. In the Recent quota increase requests pane, choose Request quota increase.
  6. For Increase quota value, enter the amount of the quota increase.
  7. Choose Request.

Add your Lambda function's use case description to your request

Complete the following steps:

  1. Open the Service Quotas dashboard.
  2. In the navigation pane, choose Quota request history. A list of your quota requests appears.
  3. Find your request to increase your concurrency limit. Then, choose the Status option next to the quota increase request. The status of your request and the associated support case link appears.
    Note: The initial status of a request is Pending. After the status changes to Quota requested, the AWS Support case number appears.
  4. Choose the case number to open the ticket for your request.
  5. In the ticket's comment thread, add the description of your Lambda function's use case.
    Note: You'll receive a status update email from AWS Support that either approves or denies the request. For more information, see Requesting a quota increase.

Related information

Operating Lambda: Application design—scaling and concurrency: part 2

AWS OFFICIAL
AWS OFFICIALUpdated a month ago