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개 답변
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
전문가
Uri
답변함 5달 전
profile picture
전문가
검토됨 한 달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠