title: Configure SQS Dead letter Queue to raise a cloud watch alarm on receiving a message
body: <p>I was working with Dead letter Queue in Amazon SQS. I want that whenever a new message is received by the queue it should raise a CloudWatch alarm. The problem is I configured an alarm on the metric: <code>number_of_messages_sent</code> of the queue but this metric don't work as expected in case of Dead letter Queues as mentioned in the <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html" rel="noreferrer">Amazon SQS Dead-Letter Queues - Amazon Simple Queue Service</a> documentation.</p>
  
  <p>Now some suggestions on this were use <code>number_of_messages_visible</code> but I am not sure how to configure this in an alarm. So if i set that the value of this <code>metric&gt;0</code> then this is not same as getting a new message in the queue. If an old message is there then the metric value will always be <code>&gt;0</code>. I can do some kind of mathematical expression to get the delta in this metric for some defined period (let's say a minute) but I am looking for some better solution.</p>