title: How to send json message to sqs by using laravel?
body: <p>I am beginner in Laravel. In my task, I need to do following points:-</p>
  
  <ol>
  <li>In a controller, store contents of csv file in an array. --- Completed</li>
  <li><p>In same controller, send step 1. array in json format to sqs (amazon) by using laravel. --- Pending</p></li>
  <li><p>For step 2), I have set the config/queue.php </p></li>
  </ol>
  
  <pre><code>'sqs' =&gt; [
              'driver' =&gt; 'sqs',
              'key' =&gt; env('AWS_ACCESS_KEY_ID'),
              'secret' =&gt; env('AWS_SECRET_ACCESS_KEY'),
              'prefix' =&gt; env('SQS_PREFIX', 'https://sqs.ap-northeast-1.amazonaws.com/xxxxxxx'),
              'queue' =&gt; env('SQS_QUEUE', 'xxxxx'),
              'region' =&gt; env('AWS_DEFAULT_REGION', 'ap-northeast-1'),
          ],
  </code></pre>
  
  <p>Also changed .env file</p>
  
  <pre><code>AWS_ACCESS_KEY_ID=xxxx
  AWS_SECRET_ACCESS_KEY=xxxxxxx
  SQS_QUEUE=data_queue_name_aws
  </code></pre>
  
  <ol start="2">
  <li><p>Created a job 
  php artisan make:job SendMessageSQS</p></li>
  <li><p>Call <code>SendMessageSQS::dispatch();</code></p></li>
  <li><p>SQS received message </p></li>
  </ol>
  
  <pre><code>{"displayName":"App\\Jobs\\SendMessageSQS","job":"Illuminate\\Queue\\CallQueuedHandler@call","maxTries":null,"delay":null,"timeout":null,"timeoutAt":null,
    "data":{"commandName":"App\\Jobs\\SendMessageSQS","command":"O:21:\"App\\Jobs\\SendMessageSQS\":3:{s:7:\"\u0000*\u0000item\";s:7:\"testing\";s:10:\"connection\";
    s:7:\"sqs\";s:6:\"\u0000*\u0000job\";N;}"}}
  </code></pre>
  
  <ol start="5">
  <li>How to send </li>
  </ol>
  
  <pre><code>$userIDs = [1,2,3]; // array values from csv file column `user-is`
  $sendMessageSqs["file-name"] = "test-sqs-1";
  $sendMessageSqs["user-id"] = $userIDs;
  </code></pre>
  
  <ol start="6">
  <li>Actual Result: SQS should store below format</li>
  </ol>
  
  <pre><code>{"file-name":"test-sqs-1","user-id":"1,2,3"}
  </code></pre>