Concurrency limits for Lambda does not allow to reserve

0

New accounts have a concurrency limit for Lambda functions set at 10. This limit is intended to protect the account owner from running too many instances in parallel before the owner gets more familiar with how the functions work. There is, however, one measure that the owner can take to protect himself from that effect - setting the reserved concurrency at 1. This will prevent the function to run in too many instances.

Unfortunately that measure is not possible when the limit is 10 because AWS requires the minimum of 100 unreserved concurrency slots. So not only that the newbie account owner cannot actually protect himself using the value 1 but moreover the whole situation is really confusing for him because he will get an error when trying to set the reserved concurrency for his function and he cannot understand why.

Moreover he needs to ask support for increasing the limit and until that he cannot limit the concurrency of his functions. That is not good.

Is there a way around that? Shouldn't this be changed in AWS?

TomFG
asked 24 days ago104 views
1 Answer
0

Considerations:

  • Initial Limits: AWS sets initial limits to prevent new users from unintentionally running up large bills or creating too many concurrent executions that could impact service stability.
  • Reserved Concurrency: The requirement for 100 unreserved concurrency slots is meant to ensure that there's always capacity for other critical functions, but it can indeed be confusing for new users.

Workarounds:

  • Requesting a Limit Increase: While this is not an immediate fix, you can request an increase in your Lambda concurrency limits through the AWS Support Center. AWS typically processes these requests quickly.

Steps:

  • Sign in to the AWS Management Console.
  • Open the Service Quotas console.
  • Select "AWS Lambda".
  • Choose "Request quota increase" for the "Concurrent executions" limit.
  • Submit the request specifying your desired limit and justification.

Function Throttling and Error Handling: Instead of relying solely on reserved concurrency, you can implement throttling and error handling mechanisms within your Lambda functions and invoking services.

Retries and Backoff: Use exponential backoff with retries in your invoking service (e.g., API Gateway, SQS) to handle throttling errors gracefully.

Queue-Based Invocation: Use Amazon SQS or Amazon SNS to queue events and manage the rate at which your Lambda functions are invoked.

Granular Monitoring: Utilize CloudWatch to monitor the concurrency and throttling of your Lambda functions. This can help you understand the usage patterns and adjust your architecture accordingly.

Feedback to AWS: While the above workarounds can help mitigate the issue, it might indeed be beneficial for AWS to reconsider the initial limits and reservation requirements to provide a smoother experience for new users. You can provide feedback to AWS through:

  • AWS Support: Mention the issue when you request a limit increase.
  • AWS Account Manager: If you have an AWS Account Manager, provide feedback directly to them.
profile picture
EXPERT
answered 24 days ago

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