PHPackages                             itsnubix/aws-sns-sms-channel - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. itsnubix/aws-sns-sms-channel

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

itsnubix/aws-sns-sms-channel
============================

AWS SNS SMS Notifications Channel for Laravel

1.0.7(1y ago)1629.4k8MITPHPPHP ^7.1.3|^8.0CI failing

Since Aug 30Pushed 1y ago2 watchersCompare

[ Source](https://github.com/itsnubix/aws-sns-sms-channel)[ Packagist](https://packagist.org/packages/itsnubix/aws-sns-sms-channel)[ RSS](/packages/itsnubix-aws-sns-sms-channel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (4)Versions (9)Used By (0)

AWS SNS SMS Notifications Channel for Laravel
=============================================

[](#aws-sns-sms-notifications-channel-for-laravel)

[![Total Downloads](https://camo.githubusercontent.com/616979def994ea3a43708a615b920b21b752efbd73b6308ada963b81fa895019/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6974736e756269782f6177732d736e732d736d732d6368616e6e656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/itsnubix/aws-sns-sms-channel)[![Build Status](https://camo.githubusercontent.com/13d0e2b5809d7d19c17705bf37e5104e8082d426ea44a122e7ba0d2352eb9898/68747470733a2f2f7472617669732d63692e6f72672f6974736e756269782f6177732d736e732d736d732d6368616e6e656c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/itsnubix/aws-sns-sms-channel/)[![Latest Stable Version](https://camo.githubusercontent.com/387200a31ddb235a2e1a87abf6123a50517cad8a521aef39336ccafb5e39ca99/68747470733a2f2f706f7365722e707567782e6f72672f6974736e756269782f6177732d736e732d736d732d6368616e6e656c2f762f737461626c652e737667)](https://packagist.org/packages/itsnubix/aws-sns-sms-channel)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

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

[](#installation)

`composer require itsnubix/aws-sns-sms-channel`

In your `config/services.php` file enter:

```
'sns' => [
    'key' => env('AWS_ACCESS_KEY_ID'),
    'secret' => env('AWS_SECRET_ACCESS_KEY'),
    'region' => env('SNS_DEFAULT_REGION'),
],
```

Notice here that the region is not necessarily your standard `AWS_DEFAULT_REGION` as only certain regions allow SMS messages to be sent from them. [Click here](https://docs.aws.amazon.com/sns/latest/dg/sns-supported-regions-countries.html) for a list of nodes that allow SMS.

Be sure that the user who owns your access key and secret has at least the following policy on AWS IAM:

```
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowSendingSMSMessages",
      "Effect": "Allow",
      "Action": [
        "sns:Publish",
        "sns:SetSMSAttributes",
        "sns:CheckIfPhoneNumberIsOptedOut"
      ],
      "Resource": ["*"]
    }
  ]
}
```

Now in your notifications you can do the following:

```
