title: DynamoDB-PHP: error when region is not east coast
body: <p>I have a PHP application, using symfony2, silex, and the AWS DynamoDB SDK. It's been working fine. The DynamoDB is created on the East Coast.</p>
  
  <p>We have a second AWS account, and we duplicated the DynamoDB structure (table names, table structures, etc. are all the same). This DynamoDB installation is on the West Coast (N. California).</p>
  
  <p>My application does not work when we try to use the second AWS credentials. </p>
  
  <p>When I try to do:</p>
  
  <pre><code>$res = $app['db']-&gt;describe_table(array('TableName' =&gt; 'account'));
  </code></pre>
  
  <p>and I dump $res, here's what I get:</p>
  
  <pre><code>CFResponse Object
  (
  [header] =&gt; Array
      (
          [x-amzn-requestid] =&gt; xxxxxxxxxxxxxxxxxxxxxxxxxx
          [x-amz-crc32] =&gt; xxxxxxxxxxxxx
          [content-type] =&gt; application/x-amz-json-1.0
          [content-length] =&gt; 143
          [date] =&gt; Wed, 28 Nov 2012 20:49:31 GMT
          [_info] =&gt; Array
              (
                  [url] =&gt; https://dynamodb.us-east-1.amazonaws.com/
                  [content_type] =&gt; application/x-amz-json-1.0
                  [http_code] =&gt; 400
                  [header_size] =&gt; 224
                  [request_size] =&gt; 896
                  [filetime] =&gt; -1
                  [ssl_verify_result] =&gt; 0
                  [redirect_count] =&gt; 0
                  [total_time] =&gt; 0.363967
                  [namelookup_time] =&gt; 0.008497
                  [connect_time] =&gt; 0.091183
                  [pretransfer_time] =&gt; 0.263514
                  [size_upload] =&gt; 28
                  [size_download] =&gt; 143
                  [speed_download] =&gt; 392
                  [speed_upload] =&gt; 76
                  [download_content_length] =&gt; 143
                  [upload_content_length] =&gt; 0
                  [starttransfer_time] =&gt; 0.363929
                  [redirect_time] =&gt; 0
                  [certinfo] =&gt; Array
                      (
                      )
  
                  [redirect_url] =&gt; 
                  [method] =&gt; POST
              )
  
          [x-aws-stringtosign] =&gt; AWS4-HMAC-SHA256
              20121128T204931Z
              20121128/us-east-1/dynamodb/aws4_request
              xxxxxxxxxxxxxxxxxxxxxxx
          [x-aws-canonicalrequest] =&gt; POST
              /
              content-length:28
              content-type:application/x-amz-json-1.0
              host:dynamodb.us-east-1.amazonaws.com
              x-amz-date:20121128T204931Z
              x-amz-target:DynamoDB_20111205.DescribeTable
              content-length;content-type;host;x-amz-date;x-amz-target
              xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
          [x-aws-request-headers] =&gt; Array
              (
                  [Content-Length] =&gt; 28
                  [Content-Type] =&gt; application/x-amz-json-1.0
                  [Host] =&gt; dynamodb.us-east-1.amazonaws.com
                  [X-Amz-Date] =&gt; 20121128T204931Z
                  [X-Amz-Target] =&gt; DynamoDB_20111205.DescribeTable
                  [Authorization] =&gt; AWS4-HMAC-SHA256 Credential=AKIAJAIBF2DKGD2UD3YQ/20121128/us-east-1/dynamodb/aws4_request,SignedHeaders=content-length;content-type;host;x-amz-date;x-amz-target,Signature=xxxxxxxxxxxxxxxxxxxxxxxx
                  [Expect] =&gt; 
              )
  
          [x-aws-body] =&gt; {"TableName":"account"}
      )
  
  [body] =&gt; CFSimpleXML Object
      (
          [__type] =&gt; com.amazonaws.dynamodb.v20111205#ResourceNotFoundException
          [message] =&gt; Requested resource not found: Table: account not found
      )
  
  [status] =&gt; 400
  )
  </code></pre>
  
  <p>I thought that the only configuration required is in the AWS DynamoDB SDK, in the file config.inc.php, where I can only configure the credentials. This does not seem to be the case,as the response has all these references to the east coast and the DynamoDB table I'm targeting is on the West Coast. Any ideas how I can tell it the AmazonSDK to point to another region? Any other issues I should be concerned about?</p>