title: Setting up SQS message queue on AWS with Laravel
body: <p>We are in the process of moving an existing application from Linode to AWS. On Linode, we used beanstalkd as our message queue and now we wanted to try SQS. We are using 2 queues: default and high. Our configuration for beanstalkd was set like this:</p>
  
  <pre><code>'connections' =&gt; [
  
      'beanstalkd' =&gt; [
          'driver' =&gt; 'beanstalkd',
          'host' =&gt; env('BEANSTALKD_HOST', 'localhost'),
          'queue' =&gt; 'default',
          'retry_after' =&gt; 86400,
      ],
  
      'high' =&gt; [
          'driver' =&gt; 'beanstalkd',
          'host' =&gt; env('BEANSTALKD_HOST', 'localhost'),
          'queue' =&gt; 'high',
          'retry_after' =&gt; 86400,
      ],
  ],
  </code></pre>
  
  <p>I'm trying to do something similar now on AWS. The configuration now looks like this:</p>
  
  <pre><code>'connections' =&gt; [
      'sqs' =&gt; [
          'driver' =&gt; 'sqs',
          'key' =&gt; env('AWS_KEY'),
          'secret' =&gt; env('AWS_SECRET'),
          'prefix' =&gt; env('AWS_SQS_URL'),
          'queue' =&gt; 'default',
          'region' =&gt; env('AWS_REGION'),
      ],
  
      'high' =&gt; [
          'driver' =&gt; 'sqs',
          'key' =&gt; env('AWS_KEY'),
          'secret' =&gt; env('AWS_SECRET'),
          'prefix' =&gt; env('AWS_SQS_URL'),
          'queue' =&gt; 'high',
          'region' =&gt; env('AWS_REGION'),
      ],        
  ],
  </code></pre>
  
  <p>I created a queue on AWS called 'dev' and I have this URL: <a href="https://sqs.eu-west-2.amazonaws.com/ACCOUNT-ID/dev" rel="nofollow noreferrer">https://sqs.eu-west-2.amazonaws.com/ACCOUNT-ID/dev</a> The error I'm getting is this: </p>
  
  <pre><code>Error executing "ReceiveMessage" on "https://sqs.eu-west-2.amazonaws.com/ACCOUNT-ID/dev/high"; AWS HTTP error: Client error: `POST https://sqs.eu-west-2.amazonaws.com/ACCOUNT-ID/dev/high` resulted in a `400 Bad Request` response:
  &lt;?xml version="1.0"?&gt;&lt;ErrorResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"&gt;&lt;Error&gt;&lt;Type&gt;Sender&lt;/Type&gt;&lt;Code&gt;A (truncated...)
   AWS.SimpleQueueService.NonExistentQueue (client): The specified queue does not exist for this wsdl version. - &lt;?xml version="1.0"?&gt;&lt;ErrorResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"&gt;&lt;Error&gt;&lt;Type&gt;Sender&lt;/Type&gt;&lt;Code&gt;AWS.SimpleQueueService.NonExistentQueue&lt;/Code&gt;&lt;Message&gt;The specified queue does not exist for this wsdl version.&lt;/Message&gt;&lt;Detail/&gt;&lt;/Error&gt;&lt;RequestId&gt;REQUEST-ID&lt;/RequestId&gt;&lt;/ErrorResponse&gt;
  </code></pre>
  
  <p>It says "The specified queue does not exist". Should I create different queue in AWS or is there a problem in my configuration?</p>
  
  <p>Supervisor configuration:</p>
  
  <pre><code>[program:worker]
  command=php /home/dev/default/current/artisan queue:work sqs --sleep=0 --daemon --quiet --timeout=0 --delay=3 --tries=3 --env=development --queue="high,default"
  
  process_name=%(program_name)s_%(process_num)02d
  autostart=true
  autorestart=true
  stopasgroup=true
  killasgroup=true
  user=dev
  numprocs=8
  stdout_logfile=
  </code></pre>