terraform-aws-clickops-notifier icon indicating copy to clipboard operation
terraform-aws-clickops-notifier copied to clipboard

Multiple slack messages with the same event id

Open nitrocode opened this issue 1 year ago • 1 comments

I'm unsure why but I'm receiving multiple slack messages for the same events with the same event ids in the dame compressed file path.

I received 10 alerts today of dynamodb:deletetable every 7 min to every 1.5 hrs. For now, it might be easier to exclude this action but i wouldnt be surprised if this happens with another action

It's almost as if it processes the sqs message but it doesnt get removed from the queue?

nitrocode avatar May 11 '23 03:05 nitrocode

Perhaps this is due to using s3:ObjectCreated:* instead of simply s3:ObjectCreated:Put ?

https://github.com/cloudandthings/terraform-aws-clickops-notifier/blob/be9694cda07dbe74fad9e332723be3b38bb5267b/deployment_organization.tf#L88

Or maybe switching to EventBridge can be used to publish events ?

https://aws.amazon.com/blogs/aws/new-use-amazon-s3-event-notifications-with-amazon-eventbridge/

Or maybe using a FIFO queue with deduplication would reduce this issue ?


One way to do it would be to create a dynamodb table that would record all event ids that were sent to slack. If the same event id appears, then ignore it.

nitrocode avatar May 31 '24 06:05 nitrocode