Closed matheus-lucena closed 4 years ago
One solution is to throttle the Lambda by setting its reservedConcurrency
setting in serverless.yml
(for example to 5
). That limits the number of Lambda instances (i.e. Laravel workers) that will run concurrently.
Here is a visual explanation: https://twitter.com/matthieunapoli/status/1239960297529622528 I'm currently working on a book that explains all of this, but in the meantime maybe the tweet can help.
There is some way to create a rate limit in the execution of the SQS, because I have a queue that processes sending email via SES, however I have a limitation of sending emails per second.