http://aws.amazon.com/code/128
http://docs.amazonwebservices.com/AmazonS3/2006-03-01/dev/RESTAuthentication.html
It will show you the StringToSign and the request headers~~
List all bucket:
./s3curl.pl --debug --id=mykey -- http://s3.amazonaws.com
s3curl: StringToSign='GET\n\n\nFri, 24 Aug 2012 17:25:14 +0000\n/'
s3curl: exec curl -H Date: Fri, 24 Aug 2012 17:25:14 +0000 -H Authorization: AWS MYKEYID:MYSECRET -L -H content-type: http://s3.amazonaws.com
Create bucket:
./s3curl.pl --debug --id=mykey --createBucket -- http://s3.amazonaws.com/test-funsung
s3curl: StringToSign='PUT\n\n\nFri, 24 Aug 2012 17:32:04 +0000\n/test-funsung'
s3curl: exec curl -H Date: Fri, 24 Aug 2012 17:32:04 +0000 -H Authorization: AWS MYKEYID:MYSECRET -L -H content-type: --data-binary -X PUT http://s3.amazonaws.com/test-funsung
Create object:
./s3curl.pl --debug --id=mykey --put=Kalimba.mp3 -- http://s3.amazonaws.com/test-funsung/Kimbula.mp3
s3curl: StringToSign='PUT\n\n\nFri, 24 Aug 2012 17:26:59 +0000\n/test-funsung/Kimbula.mp3'
s3curl: exec curl -H Date: Fri, 24 Aug 2012 17:26:59 +0000 -H Authorization: AWS MYKEYID:MYSECRET -L -H content-type: -T Kalimba.mp3 http://s3.amazonaws.com/test-funsung/Kimbula.mp3
Delete object:
./s3curl.pl --debug --id=mykey --delete -- http://s3.amazonaws.com/test-funsung/Kimbula.mp3
s3curl: StringToSign='DELETE\n\n\nFri, 24 Aug 2012 17:26:18 +0000\n/test-funsung/Kimbula.mp3'
s3curl: exec curl -H Date: Fri, 24 Aug 2012 17:26:18 +0000 -H Authorization: AWS MYKEYID:MYSECRET -L -H content-type: -X DELETE http://s3.amazonaws.com/test-funsung/Kimbula.mp3
Delete bucket:
./s3curl.pl --debug --id=mykey --delete -- http://s3.amazonaws.com/test-funsung
s3curl: StringToSign='DELETE\n\n\nFri, 24 Aug 2012 17:31:25 +0000\n/test-funsung'
s3curl: exec curl -H Date: Fri, 24 Aug 2012 17:31:25 +0000 -H Authorization: AWS MYKEYID:MYSECRET -L -H content-type: -X DELETE http://s3.amazonaws.com/test-funsung
Saturday, August 25, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment