Serhii Shliakhov
Serhii Shliakhov

Reputation: 2770

Scaling AWS Lambda with SQS

I want to use SQS for calling Lambda.
An execution time of lambda function is 3 minutes.
I want to execute 1000 lambda functions at once, so I send 1000 messages to SQS queue

But according to an AWS documentation

Amazon Simple Queue Service supports an initial burst of 5 concurrent function invocations and increases concurrency by 60 concurrent invocations per minute. https://docs.aws.amazon.com/en_us/lambda/latest/dg/scaling.html

So I should wait a few minutes until all messages will be processed. Is there any workaround to call 1000 concurrent lambda and avoid "cold start"?

UPD: I got answer from AWS support

You are correct that SQS will start at an initial burst of 5 and increase by a concurrency of 60 per minute. Scaling rates can't be increased

Upvotes: 1

Views: 1265

Answers (1)

A.Khan
A.Khan

Reputation: 3992

If you see the Automatic Scaling section of the documentation page that describes the autoscaling behaviour under sudden load. I don't think cold start would be a problem. The first batch of concurrent Lambdas executions would likely see the cold start and all the subsequent invocations would be fine.

Upvotes: 0

Related Questions