- Newest
- Most votes
- Most comments
AWS Lambda has a default concurrency limit of 1,000 concurrent executions per region for your account. This limit applies to the total number of Lambda function executions happening simultaneously across all functions in a region.
When you're experiencing the "LambdaLimitExceeded" error from CloudFront with your Lambda@Edge implementation, this indicates you've reached a concurrency limit. Lambda@Edge functions are subject to the Lambda service quotas, but they have some specific considerations since they run at CloudFront edge locations.
To resolve this issue, you have several options:
-
Request a concurrency limit increase: You can request an increase to your Lambda concurrent execution quota through the AWS Service Quotas console. This is a common approach for production services with high traffic volumes.
-
Implement reserved concurrency: You can allocate a specific amount of your account's concurrency to your Lambda@Edge function to ensure it always has capacity available.
-
Optimize your function: Ensure your image resizing function is as efficient as possible to reduce execution time, which directly impacts concurrency needs.
For determining how much to increase your limit, you should calculate your expected concurrency using this formula: Concurrency = (average requests per second) × (average function duration in seconds)
For example, if you expect 100 requests per second and your function takes 0.5 seconds to complete, you would need at least 50 units of concurrency.
For production services with significant traffic, requesting a higher concurrency limit is a standard practice. Many large-scale applications operate with increased Lambda concurrency quotas to handle their workloads efficiently.
Sources
Lambda quotas - AWS Lambda
Understanding Lambda function scaling - AWS Lambda
AccountLimit - AWS Lambda
Quotas - Innovation Sandbox on AWS
Relevant content
- AWS OFFICIALUpdated 2 years ago
