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 Respuesta
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
EXPERTO
Uri
respondido hace 5 meses
profile picture
EXPERTO
revisado hace un mes

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas