Only invoke lambda during a specific timeframe each day

0

Hi,

I currently have a service that publishes a message to an SNS topic which has a subscription with name filter to add it to an SQS queue which ultimately triggers a lambda function.

I have a use-case for the same service to raise a message but for one specific filter name subscription to only invoke a lambda during a three-hour period 00:00 and 03:00. Out with of these hours, the messages should just backup and then redistribute the next day during this time window.

Is this possible, and how/what services are required to do this?

1 Resposta
0

Add the messages to a queue and create an EventBridge schedule that enables a Lambda trigger from the queue at 00:00 and another schedule that disables the trigger at 03:00. This way the messages will be saved in the queue, but if it is outside the specified hours, no one will consume them. When the time comes, the Lambda will start processing the messages in the queue.

profile pictureAWS
ESPECIALISTA
Uri
respondido há 5 meses
profile picture
ESPECIALISTA
avaliado há um mês

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