src/Provider/AwsProvider.php
public function createSqsPolicy()
    {
        $arn = $this->sqs->getQueueArn($this->queueUrl);

        return json_encode([
            'Version'   => '2008-10-17',
            'Id'        =>  sprintf('%s/SQSDefaultPolicy', $arn),
            'Statement' => [
                [
                    'Sid'       => 'SNSPermissions',
                    'Effect'    => 'Allow',
                    'Principal' => ['AWS' => '*'],
                    'Action'    => 'SQS:SendMessage',
                    'Resource'  => $arn
                ]
            ]
        ]);
    }
public function createSqsPolicy()
    {
        $arn = $this->sqs->getQueueArn($this->queueUrl);

        return json_encode([
            'Version'   => '2008-10-17',
            'Id'        =>  sprintf('%s/SQSDefaultPolicy', $arn),
            'Statement' => [
                [
                    'Sid'       => 'SNSPermissions',
                    'Effect'    => 'Allow',
                    'Principal' => ['AWS' => '*'],
                    'Action'    => 'SQS:SendMessage',
                    'Resource'  => $arn
                ]
            ]
        ]);
    }
public function createSqsPolicy ( ) { $ arn = $ this -> sqs -> getQueueArn ( $ this -> queueUrl ) ; return json_encode ( [ 'Version' => '2008-10-17' , 'Id' => sprintf ( '%s/SQSDefaultPolicy' , $ arn ) , 'Statement' => [ [ 'Sid' => 'SNSPermissions' , 'Effect' => 'Allow' , 'Principal' => [ 'AWS' => '*' ] , 'Action' => 'SQS:SendMessage' , 'Resource' => $ arn ] ] ] ) ; }
Creates a Policy for SQS that's required to allow SNS SendMessage access

@return string
Creates a Policy for SQS that s required to allow SNS SendMessage access