kr / s3

Go package for Amazon’s S3 API
http://godoc.org/github.com/kr/s3
MIT License
107 stars 34 forks source link

Publicly accessible buckets #22

Open jbenet opened 10 years ago

jbenet commented 10 years ago

Publicly accessible buckets aren't supported. Haven't tried, but probably also problematic for policy-based access control. (Note: the bucket used below won't stay entirely public forever. Under dev. Policy will change.)

curl works

> curl -X PUT datadex.archives.s3.amazonaws.com/datafile -T Datafile

> curl datadex.archives.s3.amazonaws.com/datafile
dataset: foo/baz@1.3

s3cp doesnt

> s3cp Datafile http://datadex.archives.s3.amazonaws.com/datafile
unwanted http status 403: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>InvalidAccessKeyId</Code><Message>The AWS Access Key Id you provided does not exist in our records.</Message><RequestId>2600157E524F24B8</RequestId><HostId>xTyjKUaYFAfnNav3lLMecWRWazuzwm6V6pakKBWebP4hW9YeD8cfm1t+Z7u2kwBr</HostId><AWSAccessKeyId></AWSAccessKeyId></Error>"

> s3cp http://datadex.archives.s3.amazonaws.com/datafile /dev/stdout
unwanted http status 403: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>InvalidAccessKeyId</Code><Message>The AWS Access Key Id you provided does not exist in our records.</Message><RequestId>4544FB82A29E4170</RequestId><HostId>QIgtkNkWnWKTWFKO13/RhcVucU2hbhrgN1++cvBE1Nccirv9W3RGLle7TM4k4gtA</HostId><AWSAccessKeyId></AWSAccessKeyId></Error>"
akshayrawat commented 10 years ago

+1 - Also support pre-signed URLs