PHPackages                             peec/aws-laravel-notification - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. peec/aws-laravel-notification

ActiveLibrary

peec/aws-laravel-notification
=============================

Send SMS using AWS SNS services

1.0.3(9y ago)1522.1k2[2 issues](https://github.com/peec/aws-laravel-notification/issues)MITPHPPHP &gt;=5.6.4

Since Dec 26Pushed 9y ago2 watchersCompare

[ Source](https://github.com/peec/aws-laravel-notification)[ Packagist](https://packagist.org/packages/peec/aws-laravel-notification)[ Docs](https://github.com/peec/aws-laravel-notification)[ RSS](/packages/peec-aws-laravel-notification/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (4)Dependencies (5)Versions (5)Used By (0)

AWS SMS Laravel notification
============================

[](#aws-sms-laravel-notification)

Send sms trough AWS SNS.

Contents
--------

[](#contents)

- [Installation](#installation)
    - [Setting up the AWSSMS service](#setting-up-the-AWSSMS-service)
- [Usage](#usage)
    - [Available Message methods](#available-message-methods)
- [Changelog](#changelog)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require peec/aws-laravel-notification
```

You must install the service provider:

```
// config/app.php
'providers' => [
    ...
    NotificationChannels\AWS\AWSSMSServiceProvider::class,
],
```

### Setting up the AWSSMS service

[](#setting-up-the-awssms-service)

Add to your `config/services.php`:

```
// config/services.php
...
'awssms' => [
    'key' => env('AWSSMS_KEY'),
    'secret' => env('AWSSMS_SECRET'),
    'region' => env('AWSSMS_REGION'),
    'from' => env('AWSSMS_FROM'), // optional
    'max_price_usd' => '0.50' // Max price, sms wont send if price of the sms is more then this.
],
...
```

Usage
-----

[](#usage)

Now you can use the channel in your `via()` method inside the notification:

```
use NotificationChannels\AWS\AWSSMSChannel;
use NotificationChannels\AWS\AWSSMSMessage;
use Illuminate\Notifications\Notification;

class AccountApproved extends Notification
{
    public function via($notifiable)
    {
        return [AWSSMSChannel::class];
    }

    public function toAwsSms($notifiable)
    {
        return (new AWSSMSMessage())
            ->content("Your {$notifiable->service} account was approved!");
    }
}
```

In order to let your Notification know which phone are you sending/calling to, the channel will look for the `phone_number` attribute of the Notifiable model. If you want to override this behaviour, add the `routeNotificationForAws` method to your Notifiable model.

```
public function routeNotificationForAws()
{
    return '+1234567890';
}
```

### Available methods

[](#available-methods)

- `from('')`: Accepts a phone to use as the notification sender.
- `content('')`: Accepts a string value for the notification body.
- `type('Transactional')`: Either Transactional or Promotional. See aws docs for SNS SMS. The pricing of these vary.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Petter Kjelkenes](https://github.com/peec)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

3423d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/88b748fa2f0dcacab307a6305e98032de7adb93f955bbaf3c6fe029a7369ac84?d=identicon)[peec](/maintainers/peec)

---

Top Contributors

[![peec](https://avatars.githubusercontent.com/u/131546?v=4)](https://github.com/peec "peec (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/peec-aws-laravel-notification/health.svg)

```
[![Health](https://phpackages.com/badges/peec-aws-laravel-notification/health.svg)](https://phpackages.com/packages/peec-aws-laravel-notification)
```

###  Alternatives

[aws/aws-sdk-php-laravel

A simple Laravel 9/10/11/12/13 service provider for including the AWS SDK for PHP.

1.7k35.6M75](/packages/aws-aws-sdk-php-laravel)[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[laravel-notification-channels/aws-sns

Amazon Simple Notification Service (AWS SNS) notification channel for Laravel.

541.1M2](/packages/laravel-notification-channels-aws-sns)[laravel-notification-channels/apn

Apple APN Push Notification Channel

2021.9M4](/packages/laravel-notification-channels-apn)[laravel-notification-channels/microsoft-teams

A Laravel Notification Channel for Microsoft Teams

1603.0M7](/packages/laravel-notification-channels-microsoft-teams)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
