I use Python and tinys3 to write files to S3, but it does not work. Here is my 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')
This gives the result:
<Response [301]> <Response [301]>
When I try to specify the endpoint, I get:
requests.exceptions.HTTPError: 403 Client Error: Forbidden
Any idea what I'm doing wrong?
Edit: When I try to use boto, it works, so the problem is not with the access key or secret key.
source share