src/Provider/AwsProvider.php
public function createQueue()
    {
        $attributes = [
            'VisibilityTimeout'             => $this->options['message_timeout'],
            'MessageRetentionPeriod'        => $this->options['message_expiration'],
            'ReceiveMessageWaitTimeSeconds' => $this->options['receive_wait_time']
        ];

        if ($this->isQueueFIFO()) {
            $attributes['FifoQueue'] = 'true';
            $attributes['ContentBasedDeduplication'] = $this->options['content_based_deduplication'] === true
                ? 'true'
                : 'false';
        }

        $result = $this->sqs->createQueue(['QueueName' => $this->getNameWithPrefix(), 'Attributes' => $attributes]);

        $this->queueUrl = $result->get('QueueUrl');

        $key = $this->getNameWithPrefix() . '_url';
        $this->cache->save($key, $this->queueUrl);

        $this->log(200, "Created SQS Queue", ['QueueUrl' => $this->queueUrl]);

        if ($this->options['push_notifications']) {

            $policy = $this->createSqsPolicy();

            $this->sqs->setQueueAttributes([
                'QueueUrl'      => $this->queueUrl,
                'Attributes'    => [
                    'Policy'    => $policy,
                ]
            ]);

            $this->log(200, "Created Updated SQS Policy");
        }
    }
public function createQueue()
    {
        $attributes = [
            'VisibilityTimeout'             => $this->options['message_timeout'],
            'MessageRetentionPeriod'        => $this->options['message_expiration'],
            'ReceiveMessageWaitTimeSeconds' => $this->options['receive_wait_time']
        ];

        if ($this->isQueueFIFO()) {
            $attributes['FifoQueue'] = 'true';
            $attributes['ContentBasedDeduplication'] = $this->options['content_based_deduplication'] === true
                ? 'true'
                : 'false';
        }

        $result = $this->sqs->createQueue(['QueueName' => $this->getNameWithPrefix(), 'Attributes' => $attributes]);

        $this->queueUrl = $result->get('QueueUrl');

        $key = $this->getNameWithPrefix() . '_url';
        $this->cache->save($key, $this->queueUrl);

        $this->log(200, "Created SQS Queue", ['QueueUrl' => $this->queueUrl]);

        if ($this->options['push_notifications']) {

            $policy = $this->createSqsPolicy();

            $this->sqs->setQueueAttributes([
                'QueueUrl'      => $this->queueUrl,
                'Attributes'    => [
                    'Policy'    => $policy,
                ]
            ]);

            $this->log(200, "Created Updated SQS Policy");
        }
    }
public function createQueue ( ) { $ attributes = [ 'VisibilityTimeout' => $ this -> options [ 'message_timeout' ] , 'MessageRetentionPeriod' => $ this -> options [ 'message_expiration' ] , 'ReceiveMessageWaitTimeSeconds' => $ this -> options [ 'receive_wait_time' ] ] ; if ( $ this -> isQueueFIFO ( ) ) { $ attributes [ 'FifoQueue' ] = 'true' ; $ attributes [ 'ContentBasedDeduplication' ] = $ this -> options [ 'content_based_deduplication' ] === true ? 'true' : 'false' ; } $ result = $ this -> sqs -> createQueue ( [ 'QueueName' => $ this -> getNameWithPrefix ( ) , 'Attributes' => $ attributes ] ) ; $ this -> queueUrl = $ result -> get ( 'QueueUrl' ) ; $ key = $ this -> getNameWithPrefix ( ) . '_url' ; $ this -> cache -> save ( $ key , $ this -> queueUrl ) ; $ this -> log ( 200 , "Created SQS Queue" , [ 'QueueUrl' => $ this -> queueUrl ] ) ; if ( $ this -> options [ 'push_notifications' ] ) { $ policy = $ this -> createSqsPolicy ( ) ; $ this -> sqs -> setQueueAttributes ( [ 'QueueUrl' => $ this -> queueUrl , 'Attributes' => [ 'Policy' => $ policy , ] ] ) ; $ this -> log ( 200 , "Created Updated SQS Policy" ) ; } }
Creates an SQS Queue and returns the Queue Url

The create method for SQS Queues is idempotent - if the queue already
exists, this method will return the Queue Url of the existing Queue.
Creates an SQS Queue and returns the Queue Url