Download the PHP package sinemacula/laravel-aws-sns-listener without Composer
On this page you can find all versions of the php package sinemacula/laravel-aws-sns-listener. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sinemacula/laravel-aws-sns-listener
More information about sinemacula/laravel-aws-sns-listener
Files in sinemacula/laravel-aws-sns-listener
Package laravel-aws-sns-listener
Short Description Laravel package to handle AWS SNS notifications with seamless integration and event-driven architecture
License Apache-2.0
Informations about the package laravel-aws-sns-listener
Laravel AWS SNS Listener
Laravel integration package for receiving AWS SNS webhooks with signature validation, typed payload mapping, and Laravel event dispatch.
What This Package Does
- Registers an SNS webhook route in your Laravel app.
- Validates incoming SNS signatures with AWS certificates.
- Maps SNS payloads to typed message entities.
- Handles subscription confirmation for expected topics.
- Dispatches Laravel events for generic and provider-specific notifications.
Installation
The service provider is auto-discovered by Laravel.
Configuration
Publish the config file:
Key options (config/aws.php):
aws.sns.route: webhook path for SNS callbacks (default:/hooks/sns).aws.sns.topics: expected topic ARNs for subscription confirmation checks.
Environment examples:
To disable auto route registration, set aws.sns.route to false in config.
Request Flow
- SNS posts to the configured route.
VerifySnsSignaturevalidates the message signature.MessageFactorymaps the payload to a typed message.SnsControllerhandles the message and dispatches events.
For SubscriptionConfirmation, the package confirms the subscription URL only when the topic is registered in
aws.sns.topics.
Dispatched Events
SineMacula\Aws\Sns\Events\SubscriptionConfirmedSineMacula\Aws\Sns\Events\NotificationReceivedSineMacula\Aws\Sns\Events\SNSNotificationReceivedSineMacula\Aws\Sns\Events\S3NotificationReceivedSineMacula\Aws\Sns\Events\SesNotificationReceivedSineMacula\Aws\Sns\Events\CloudWatchNotificationReceived
Each event carries a typed message object implementing the matching contract interface from
SineMacula\Aws\Sns\Entities\Messages\Contracts.
Example Listener
Testing
Contributing
Contributions are welcome via GitHub pull requests.
Security
If you discover a security issue, please contact Sine Macula directly rather than opening a public issue.
License
Licensed under the Apache License, Version 2.0.
All versions of laravel-aws-sns-listener with dependencies
aws/aws-php-sns-message-validator Version ^1.9
aws/aws-sdk-php Version ^3.319
illuminate/http Version *
illuminate/support Version *
nesbot/carbon Version *