0

In my project, I add messages only between 4 am and 7 pm pacific time to my AWS SQS. After 7 pm pacific time and until 4 am next day, I do not add any messages to my AWS SQS.

So I would like to monitor the AWS SQS between 4 am and 7 pm pacific time only otherwise one of my monitoring condition triggers alarm for valid no message period (after 7 pm).

My monitoring conditions are: (1) If there are no messages added to queue between 4 am and 7 pm pacific time for more than 10 minutes, raise an alarm. (2) If there are no messages removed from the queue for more than 10 minutes between 4 am and 7 pm pacific time, raise an alarm.

Is this feasible? If so, please explain how? I appreciate your time spent on my question.

ms94043
  • 3
  • 3
  • You *could* create something like the [Unreliable Town Clock](https://alestic.com/2015/05/aws-lambda-recurring-schedule/) to send keep-alive messages to your queue during the off-times. – Michael - sqlbot Jan 25 '18 at 01:01
  • Possible duplicate of [Can AWS CloudWatch alarms be paused/disabled during specific hours?](https://stackoverflow.com/questions/24737359/can-aws-cloudwatch-alarms-be-paused-disabled-during-specific-hours) – warbi Feb 18 '19 at 09:42

1 Answers1

1

How about using AWS Lambda or a (cron job in an instance) to do this?

  • Create a Lambda that runs at 3:50 PM that would setup CloudWatch Alarm for the SQS traffic.
  • Create a Lamda that runs at 7 PM that would disable this CloudWatch Alarm.
Sendil
  • 26
  • 4
  • Thank you Sendil. This looks like feasible solution. I shall try this and update you how it goes. – ms94043 Jan 25 '18 at 22:10