title: Upload to Amazon S3 using tinys3
body: <p>I'm using Python and tinys3 to write files to S3, but it's not working. Here's my code:</p>
  
  <pre><code>import tinys3
  conn = tinys3.Connection('xxxxxxx','xxxxxxxx',tls=True)
  
  f = open('testing_s3.txt','rb')
  print conn.upload('testing_data/testing_s3.txt',f,'testing-bucket')
  print conn.get('testing_data/testing_s3.txt','testing-bucket')
  </code></pre>
  
  <p>That gives the output:</p>
  
  <pre><code>&lt;Response [301]&gt;
  &lt;Response [301]&gt;
  </code></pre>
  
  <p>When I try specifying the endpoint, I get:</p>
  
  <pre><code>requests.exceptions.HTTPError: 403 Client Error: Forbidden
  </code></pre>
  
  <p>Any idea what I'm doing wrong?</p>
  
  <p>Edit: When I try using boto, it works, so the problem isn't in the access key or secret key.</p>