title: How to access existing Amazon DynamoDB Table?
body: <p><strong>General Problem</strong></p>
  
  <p>I have followed <a href="http://docs.aws.amazon.com/mobile/sdkforandroid/developerguide/dynamodb_om.html" rel="nofollow noreferrer">this tutorial</a> on creating and accessing an Amazon DynamoDB from an Android application, and then adapted it for use in an app I am writing. It works great despite the difficulties I faced getting it up and running. However, I would also like to be able to access the database using a python script running on my Raspberry Pi.</p>
  
  <p>I have found <a href="http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GettingStarted.Python.html" rel="nofollow noreferrer">this tutorial</a>, but it seems to only describe how to interact with a local DynamoDB table. </p>
  
  <p><strong>Specific Problem</strong></p>
  
  <p>The following code connects and writes an item to a DynamoDB table. I can't find any sort of endpoint URL for my Amazon DynamoDB, only the ARN, and there is no passing of a password or username as I use in my App.</p>
  
  <pre><code># Helper class to convert a DynamoDB item to JSON.
  class DecimalEncoder(json.JSONEncoder):
      def default(self, o):
          if isinstance(o, decimal.Decimal):
              if o % 1 &gt; 0:
                  return float(o)
              else:
                  return int(o)
          return super(DecimalEncoder, self).default(o)    
  
  dynamodb = boto3.resource('dynamodb', region_name='us-west-2', endpoint_url="http://localhost:8000")    
  
  table = dynamodb.Table('Movies')    
  
  title = "The Big New Movie"
  year = 2015    
  
  response = table.put_item(
     Item={
          'year': year,
          'title': title,
          'info': {
              'plot':"Nothing happens at all.",
              'rating': decimal.Decimal(0)
          }
      }
  )
  </code></pre>
  
  <p>I have searched for any sort of instructions for connecting to an Amazon DynamoDB instance, but everything I have found describes a local table. If anyone can give advice for the specific issue or recommend a tutorial to that effect, I would appreciate it immensely.</p>