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 Respostas
2
Resposta aceita

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
ESPECIALISTA
respondido há 3 meses
profile picture
ESPECIALISTA
avaliado há 2 meses
profile picture
ESPECIALISTA
avaliado há 3 meses
profile pictureAWS
ESPECIALISTA
avaliado há 3 meses
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

respondido há 3 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas