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ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ