Laravel SNS Events is a package by rennokki that allows you to listen to Amazon Simple Notification Service (SNS) webhooks via Laravel Events. It implements a controller that is made to properly listen to SNS HTTPS webhooks and trigger events on which you can listen to in Laravel:
Then you process events by registering listeners in your app’s EventServiceProvider class:
1protected $listen = [2 ...3 SnsEvent::class => [4 // add your listeners here for SNS events5 ],6 SnsSubscriptionConfirmation::class => [7 // add your listeners here in case you want to listen to subscription confirmation8 ],9];
If you are not familiar with SNS, Amazon describes on the SNS product page as follows:
Amazon Simple Notification Service (SNS) is a highly available, durable, secure, fully managed pub/sub messaging service that enables you to decouple microservices, distributed systems, and serverless applications. Amazon SNS provides topics for high-throughput, push-based, many-to-many messaging. Using Amazon SNS topics, your publisher systems can fan out messages to a large number of subscriber endpoints for parallel processing, including Amazon SQS queues, AWS Lambda functions, and HTTP/S webhooks.
To learn more about the full capabilities of this package, including source code, documentation, and examples, check out the project on GitHub at rennokki/laravel-sns-events.
Related: rennokki is the author of Laravel Befriended, a package which brings social media-like features like following, blocking and filtering content based on following or blocked models.