Trigger Lambda from SQS with delay after each trigger

0

I have a use case to trigger a lambda function from SQS queue and get data from cloudtrail lookup events api . But the api is giving Rate exceeded error because the SQS is triggering the lambda function continously without any delay so there is no delay in subsequent api requests . How can i control the trigger of lambda function with delays so that there is a gap in subsequent api requests .

2 回答
2
已接受的回答

Hello.

How about setting up a delay queue on the SQS side?
By setting this, you will be able to wait up to 15 minutes before processing a message.
https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-delay-queues.html

profile picture
专家
已回答 3 个月前
profile picture
专家
已审核 2 个月前
profile picture
专家
已审核 3 个月前
profile pictureAWS
专家
已审核 3 个月前
0

I have a lambda function that sends some data to sqs queue in form of messages like 10-15 messages at a time. Now what I want is when these messages arrive in queue I need a 30 sec delay after which these messages are sent to lambda function trigger . Setting delivery delay doesn't work for me because it delays all the messages for that particular time and after that it sends all at once

已回答 3 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则