Reputation: 4518
Is there a way in AWS Simple Notification Service to execute some application script (or callback) if the message delivery fails for example? It seems that the only way to monitor the delivery status is only through the CloudWatch Logs?
Upvotes: 0
Views: 619
Reputation: 1598
From the CloudWatch Logs, you can set-up a Lambda function that watches out for failed SNS delivery and does what you need to handle the failure.
As an aside, you might also consider having your SNS topic simply forward messages to an SQS queue. From there, your application simply pulls a message from the queue whenever it's ready and available, then subsequently deletes it. This frees you up from having to handle the case wherein your app is overloaded and it is not able to process the SNS event that just occurred.
Upvotes: 1