title: Error: "The security token included in the request is invalid" when using Boto python
body: <p>I am getting this error when I run my django project on nginx. I use dynamodb for database and S3 for serving static files in the project. The project runs fine when operated on localhost.</p>
  <p>The project originally was hosted in another ec2 instance where it ran like charm. I fired up a new ec2 instance from an image of that instance. And now it is throwing this error.
  The thing is,</p>
  <blockquote>
  <p>the connection works fine when I run some test code on the command
  line.</p>
  </blockquote>
  <p>But throws this error when the project runs.</p>
  <h1>JSONResponseError at /</h1>
  <pre><code>JSONResponseError: 400 Bad Request
  {u'message': u'The security token included in the request is invalid.', u'__type': u'com.amazon.coral.service#UnrecognizedClientException'}
  Request Method: POST
  Request URL:    http://ec2-54-200-144-115.us-west-2.compute.amazonaws.com/?attempt=1&amp;code=AQBfOzPR4Hlgrpkjz-qXQj8b7OLq6cm1NM_oZf64Wz3EmlX2-VDS6qfZ5V5f0Tmbx4MrLc4SGuJxUHa8drQClz3A1IWMVqUGKLEEW_0ol1RqClI8cZViWreBm5c3HJ-Vp48Xx81a7gvXSjRNJUn-kazXqahDrgsAeLez_8FrXIb_HWHyekhnUmxgkskRGBNzcTtpqASNe3agzG3ZZowCMYi6bDBAdVuODli3ApWQWENSmjLaN5QbZWbGo3ATvJNMAUQjj6VTHCkVS-UWcuh-PtwAAFtUqb8HkLsbFG31KevwPKz6x10ojD45pe03zA1SF_g
  Django Version: 1.5
  Exception Type: JSONResponseError
  Exception Value:    
  JSONResponseError: 400 Bad Request
  {u'message': u'The security token included in the request is invalid.', u'__type': u'com.amazon.coral.service#UnrecognizedClientException'}
  Exception Location: /srv/www/test/local/lib/python2.7/site-packages/boto/dynamodb2/layer1.py in _retry_handler, line 1530
  Python Executable:  /srv/www/test/bin/python
  Python Version: 2.7.3
  </code></pre>
  <p>Can't understand what's going on. Can anyone help me?</p>