Is there a design pattern in serverless/sst for th...
# help
j
Is there a design pattern in serverless/sst for throttling calls to a third-party API? For example we have an API we use that has a 2 request per minute limit. Is there an established pattern for processing jobs within a serverless framework at maximum rate?
t
For a time based limit I'd probably have something that fires a lambda on schedule that pulls stuff off a queue
j
ah, yeah, cool. so we throw those jobs onto the queue an setup a cron and separate lamba to pull them off. šŸ‘
a
Iā€™ve been using SQS queues to do this, and also you can delay the messages in there.
SQS has some parameters to define when to process the messages.
j
This was my hunch, that we would need to queue them up somewhere. Previously we used a Bull queue in our Express app.
Thanks, this is what is needed, awesome.
a
šŸ‘
j
deliveryDelay? looks like the param I want
a
Exactly, thatā€™s what Iā€™ve used.