Internal rate limiting in Node.js for AWS Lambda

Viewed 28

I have a lambda function in AWS that is calling an API that has a rate limit of 120 calls per second. It's a paginated listing API, so it'll loop and keep hitting this API until there's no more pages left to get. How do I limit the calls so that my lambda will only hit this API 120 times a second?

1 Answers

Hi maybe your lambda have 10 of concurrency, i mean, though you have a rate limit of 120 call per second you lambda in the same time(concurrency) run a 10 lambdas with this configuration, check the concurrency configuration in your lambda for change to 1, if still this issue i will recommend you to use the SQS, because with a queue you can have better control of how to send information for example an API.

Related