SNS client

This page contains some example usage for SNS. There are other resources that explain authentication and configuration.

The SNS package could be installed with Composer.

composer require async-aws/sns

Usage

Send a message

use AsyncAws\Sns\Input\PublishInput; use AsyncAws\Sns\SnsClient; $sns = new SnsClient(); $result = $sns->publish(new PublishInput([ 'TopicArn' => 'arn:aws:sns:us-east-1:46563727:purchase', 'Message' => 'New Purchase order', ])); echo $result->getMessageId();