title: Access denied to SQS via AWS SDK
body: <p>I'm currently working on a website developed with Symfony2 and I need to send messages in an Amazon SQS. In order to do that I added to my <code>composer.json</code>: </p>
  
  <pre><code>"aws/aws-sdk-php": "2.4.*"
  </code></pre>
  
  <p>Then when I try to create a queue or list queues I've got a 403 error saying: </p>
  
  <blockquote>
    <p>Access to the resource <a href="https://sqs.us-west-2.amazonaws.com/">https://sqs.us-west-2.amazonaws.com/</a> is denied.</p>
  </blockquote>
  
  <p><strong>EDIT:</strong>
  added the full error message</p>
  
  <blockquote>
    <p>AWS Error Code: AccessDenied, Status Code: 403, AWS Request ID:
    2fe34c11-7af8-5445-a768-070159a0953e, AWS Error Type: client, AWS
    Error Message: Access to the resource
    <a href="https://sqs.us-west-2.amazonaws.com/">https://sqs.us-west-2.amazonaws.com/</a> is denied., User-Agent:
    aws-sdk-php2/2.4.11 Guzzle/3.7.4 curl/7.25.0 PHP/5.4.3</p>
  </blockquote>
  
  <p>Here is a sample code of what I do:</p>
  
  <pre><code>$aws = Aws::factory(array(
    'key'    =&gt; 'my-key',
    'secret' =&gt; 'my-secret',
    'region' =&gt; 'us-west-2'
  ));
  
  $sqs = $aws-&gt;get('sqs');
  
  return new Response(var_dump($sqs-&gt;listQueues()));
  </code></pre>
  
  <p>What do I do wrong to get this error ?</p>