Hi all!
I have my media files on S3 in a bucket called "
media.example.org". A
CNAME record points requests for
media.example.org to S3.
If I try to access my bucket via boto, I get the following error:
send: 'GET
https://media.example.org.s3.amazonaws.com:443/?&max-keys=0
HTTP/1.1\r\nHost:
media.example.org.s3.amazonaws.com:443\r\nAccept-
Encoding: identity\r\nDate: Thu, 21 Oct 2010 13:52:04 GMT\r\nContent-
Length: 0\r\nAuthorization: AWS AKIAJURBA2V4BF5NN6XA:cSEoitXF
+3GEdL2LGKQhwA36BbE=\r\nUser-Agent: Boto/2.0b3 (linux2)\r\n\r\n'
reply: 'HTTP/1.1 307 Temporary Redirect\r\n'
header: x-amz-request-id: C39F12CF3632D9FA
header: x-amz-id-2: DbBgYqLFP/f+q6svsWsXfYercSR1Hacpixix7u/
fsSslGPEMTkr22Wo9YjNmacHX
header: Location:
https://media.example.org.s3-external-3.amazonaws.com/?&max-keys=0
header: Content-Type: application/xml
header: Transfer-Encoding: chunked
header: Date: Thu, 21 Oct 2010 13:52:04 GMT
header: Server: AmazonS3
send: 'GET /?&max-keys=0 HTTP/1.1\r\nHost:
s3.amazonaws.com:443\r
\nAccept-Encoding: identity\r\nDate: Thu, 21 Oct 2010 13:52:04 GMT\r
\nContent-Length: 0\r\nAuthorization: AWS AKIAJURBA2V4BF5NN6XA:cSEoitXF
+3GEdL2LGKQhwA36BbE=\r\nUser-Agent: Boto/2.0b3 (linux2)\r\n\r\n'
reply: 'HTTP/1.1 403 Forbidden\r\n'
header: x-amz-request-id: DD280BFC31B05113
header: x-amz-id-2: elN7sOHC
+5zAgKgFjISdM4PNjl9GRQsh9nRAxccBeQmf6KfGQaGRSCVYKx0oaJh5
header: Content-Type: application/xml
header: Transfer-Encoding: chunked
header: Date: Thu, 21 Oct 2010 13:52:05 GMT
header: Server: AmazonS3
Traceback (most recent call last):
File "test_boto.py", line 13, in <module>
main()
File "test_boto.py", line 10, in main
bucket = conn.get_bucket(bucket)
File "/home/basti/.virtualenvs/4f/src/boto/boto/s3/connection.py",
line 325, in get_bucket
bucket.get_all_keys(headers, maxkeys=0)
File "/home/basti/.virtualenvs/4f/src/boto/boto/s3/bucket.py", line
295, in get_all_keys
'', headers, **params)
File "/home/basti/.virtualenvs/4f/src/boto/boto/s3/bucket.py", line
262, in _get_all
response.status, response.reason, body)
boto.exception.S3ResponseError: S3ResponseError: 403
Forbidden
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>SignatureDoesNotMatch</Code><Message>The request
signature we calculated does not match the signature you provided.
Check your key and signing method.</Message><StringToSignBytes>47 45
54 0a 0a 0a 54 68 75 2c 20 32 31 20 4f 63 74 20 32 30 31 30 20 31 33
3a 35 32 3a 30 34 20 47 4d 54 0a 2f</
StringToSignBytes><RequestId>DD280BFC31B05113</
RequestId><HostId>elN7sOHC
+5zAgKgFjISdM4PNjl9GRQsh9nRAxccBeQmf6KfGQaGRSCVYKx0oaJh5</
HostId><SignatureProvided>cSEoitXF+3GEdL2LGKQhwA36BbE=</
SignatureProvided><StringToSign>GET
Thu, 21 Oct 2010 13:52:04 GMT
/</StringToSign><AWSAccessKeyId>AKIAJURBA2V4BF5NN6XA</AWSAccessKeyId></
Error>
Can someone please point me in the right direction?
Bheers,
Sebastian