laxman
laxman

Reputation: 2110

What is the maximum number of instances lambda can launch?

from the docs

Lambda automatically scales up the number of instances of your function to handle high numbers of events.

What I understood is, if there are 10 incoming requests for a particular lambda function, then 10 instances of that runtime(lets say nodejs) will be launched.

Now, my questions:

  1. What is the maximum number of instances that lambda allows ? (looked into docs but didn't found this)

  2. Since there would be some maximum cap what is the fallback if that number is reached ?

Upvotes: 0

Views: 446

Answers (1)

Thales Minussi
Thales Minussi

Reputation: 7215

  1. The default account number is 1000, but this is a soft limit and can be increased.

Concurrency in Lambda actually works similarly to the magical pizza model. Each AWS Account has an overall AccountLimit value that is fixed at any point in time, but can be easily increased as needed, just like the count of slices in the pizza. As of May 2017, the default limit is 1000 “slices” of concurrency per AWS Region.

You can check this limit under Concurrency inside your Lambda function, just like the image below:

enter image description here

  1. You can use services with some retry logic already built-in to in order to decouple your applications (think of SQS, SNS, Kinesis, etc). If the Lambda requests are all HTTP(S) though, then you will get 429 (Too Many Requests) HTTP responses and the requests will be lost.

You can see Lambda's default retry behaviour here

Upvotes: 1

Related Questions