title: Amazon DynamoDB -- region-specific connection
body: <p>I'm using the <code>boto</code> library in Python to connect to DynamoDB.  The following code has been working for me just fine:</p>
  
  <pre><code>import boto
  key = 'abc'
  
  secret = '123'
  con = boto.connect_dynamodb(key,secret)
  table = con.get_table('Table Name')
  -- rest of code --
  </code></pre>
  
  <p>When I try to connect to a specific region, I can connect just fine, but getting the table to work on is throwing an error:</p>
  
  <pre><code>import boto
  from boto.ec2.connection import EC2Connection
  
  key = 'abc'
  secret = '123'
  regions = EC2Connection(key,secret).get_all_regions() # some filtering after this line to remove unwanted entries
  for r in regions:
    con = boto.connect_dynamodb(key,secret,region=r)
    table = con.get_table('Table Name') # throws the error below
    -- rest of code --
  </code></pre>
  
  <p>Using the second block of code above, I get a <code>ValueError: No JSON object could be decoded</code>.  Calling <code>con.list_tables()</code> shows the table I'm looking for in the first code block, but throws the same error when I try it in the second code block.  Can anyone help me out?</p>